User Tools

Site Tools


old:install_gsdl_from_svn_in_linux

This page is in the 'old' namespace, and was imported from our previous wiki. We recommend checking for more up-to-date information using the search box.

Getting Greenstone2 running under linux, using SVN and Apache

NB: These instructions will apply from 7th June 2007

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

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

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

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/.

4. Tell apache about greenstone

The basic method for making a greenstone installation available through a web server is to

  • Make the contents of the gsdl home folder visible on the web by placing them (or a symbolic link to them) somewhere within the htdocs folder of your apache installation.
  • Make some or all of the contents of the gsdl/cgi-bin folder available for execution on your apache server by placing a them (or a symbolic link to them) into the cgi-bin folder of your apache installation. (Make sure you include at least the 'library' or 'library.exe' executable.)
  • Create/edit the gsdlsite.cfg file inside the cgi-bin folder of apache, as a sibling of the 'library' or 'library.exe' executable.

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

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
old/install_gsdl_from_svn_in_linux.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1