greenstone.org
greenstone wiki
greenstone trac
planet greenstone

# Install GSDL from SVN in Linux

### From GreenstoneWiki

NB: These instructions will apply from 7th June 2007

[edit]

## Getting Greenstone2 running under linux, using SVN and Apache

My sample user is `xxx` - substitute your username for `xxx` in the following instructions.

[edit]

### 1. Get Greenstone from SVN

We generally advise people to install greenstone on the research partition of your computer - some people have had problems installing in their home directory. But you can try in your home directory if you like. Assuming you will use the research partition:

    mkdir /research/xxx (create a place for your research files if you haven't already)
    cd /research/xxx
    svn co http://svn.greenstone.org/gsdl/trunk gsdl

Change to the `gsdl` directory and check out the indexers:

    cd gsdl
    svn co http://svn.greenstone.org/indexers/trunk indexers

Still in the `gsdl` directory, compile the code:

    ./configure
    make
    make install

Now greenstone is installed in `/research/xxx/gsdl` :-)

[edit]

### 2. If you want to use the GLI

In the `gsdl` directory, run:

    svn co http://svn.greenstone.org/gli/trunk gli
    cd gli
    ./makegli.sh

To start the GLI, in the `gli` directory run:

    ./gli.sh

[edit]

### 3. Install Apache

You will need to install Apache to be able to run the cgi executable.

Download a recent Apache2 binary from http://httpd.apache.org/download.cgi (Apache1.3 will also work, but Apache2 is much better.)

Unpack the tar file:

    cd /research/xxx
    tar -xzf apache_2.x.x.tar.gz

Compile the source:

    cd apache_2.x.x
    ./configure --prefix=/research/xxx/httpd
    make
    make install

Now apache is installed in `/research/xxx/httpd` :-)

To start and stop apache, type

     /research/xxx/httpd/bin/apachectl start
     /research/xxx/httpd/bin/apachectl stop

To change the port that apache runs on, edit the `/research/xxx/conf/httpd.conf` file and change the Port or Listen directive to the correct port - `8080` is a good choice. After restarting apache you will then be able to access your apache installation at http://localhost:8080/.

[edit]

### 4. Tell apache about greenstone

There are different ways of setting this up. This is the way I used.

    cd /research/xxx/httpd/cgi-bin
    ln -s /research/xxx/httpd/gsdl
    ln -s /research/xxx/gsdl/cgi-bin/library
    cp /research/xxx/gsdl/cgi-bin/gsdlsite.cfg .
    cd /research/xxx/htdocs
    ln -s /research/xxx/gsdl

You may need to edit the `gsdlsite.cfg` file. Make sure the following are uncommented and set like this:

    gsdlhome /research/xxx/gsdl
    httpprefix /gsdl
    httpimg /gsdl/images

Now you need to edit apaches config file `/research/xxx/httpd/conf/httpd.conf`

In the `<Directory "/research/xxx/httpd/cgi-bin">` bit, change 'Options None' to 'Options FollowSymlinks'

After editing the `httpd.conf` file, you will need to restart apache for the changes to take effect.

You should now be able to access your greenstone installation at http://localhost:8080/cgi-bin/library

[edit]

## Updating your installation

To update your gsdl installation, or gli, do an `svn update` in the appropriate directory and then recompile the source code. For example, to update the main gsdl installation, run:

    cd /research/xxx/gsdl
    svn update
    make clean
    ./configure
    make
    make install

Retrieved from "http://greenstonewiki.cs.waikato.ac.nz/wiki/index.php/Install_GSDL_from_SVN_in_Linux"

##### Views

- Article
- Discussion
- Edit
- History

##### Personal tools

- Go to greenstone.org
- Log in
- Create an account

##### Search

##### Toolbox

- What links here
- Related changes
- Upload file
- Special pages
- Printable version