greenstone.org greenstone wiki greenstone trac planet greenstone

Installing Greenstone

From GreenstoneWiki

Contents

How do I compile Greenstone from a source or SVN distribution?

For simple instructions, see Compiling Greenstone.

For more detailed instructions and platform specific notes, see Compiling Greenstone Advanced.

For a step by step walkthrough for compilation on Linux, see Installing Greenstone 2 from source for Beginners.

What is the difference between Greenstone's local library and web library?

Firstly, the local library is only available if you're running Greenstone under Windows. It's not yet available on Unix.

The major difference between the two is that the local library contains it's own built-in webserver. The web library however, requires an external webserver like Apache or Microsoft IIS. This makes the local library much easier to install and configure than the web library.

For this reason, it's recommended that Windows users install the local library unless they're sure that they need the web library. Even if you think you might need the web library, try installing the local library first. You can always uninstall it later and install the web library if you then decide you need it.

A situation where the web library may be preferable is if you plan to serve your Greenstone collections as a full-time service on the web. In this case you'll probably want the added stability that running the web library in conjunction with an external webserver can provide.

Please note that the local library is quite capable of serving Greenstone collections over a local area network or the web (despite its rather misleading name).

How do I use Greenstone's web library with IIS?

Note: we don't use IIS, test Greenstone with it, or recommend it (Apache has a much better security record, and of course it's open source).

After installing the web library version of Greenstone, configure IIS by following these steps:

  1. Visit http://localhost in a web browser to check that IIS is running
  2. Run the IIS configuration program (Control Panel -> Administrative Tools -> Internet Information Services)
  3. Double-click on the local computer, then Web Sites. Right-click on Default Web Site, choose New -> Virtual Directory. Set the Alias to "gsdl", the Content Directory to the directory where you installed Greenstone (eg. C:\Program Files\Greenstone), and allow "Read" and "Browse" permissions only.
  4. Open the new "gsdl" entry, right-click on the "cgi-bin" folder and choose Properties. Enter "Greenstone" as the Application name and choose "Scripts and Executables" for Execute Permissions. Untick "Directory browsing".
  5. IIS 6: Copy the gsdlsite.cfg file from the Greenstone "cgi-bin" folder into the main Greenstone folder.
  6. IIS 6: expand Local Computer, click "Web Service Extension", then right-click "All Unknown CGI Extensions" and choose Allow. (Thanks to Victor T. Jones, Jr.)
  7. Close the IIS configuration program.
  8. Make the Greenstone "etc\error.txt", "etc\key.db" and "etc\users.db" files world-writeable by opening a DOS prompt (Start -> Run -> cmd.exe) then running:
    cacls "C:\Program Files\Greenstone\etc\error.txt" /P Everyone:F
    cacls "C:\Program Files\Greenstone\etc\key.db" /P Everyone:F
    cacls "C:\Program Files\Greenstone\etc\users.db" /P Everyone:F

You should now be able to access your Greenstone library at http://localhost/gsdl/cgi-bin/library.exe.

How do I install the Greenstone Librarian Interface as an applet?

Install the GLI applet by following the instructions on this page.

How do I enable the remote building facility?

Enable the remote building facility by following the instructions on this page. This is similare to install the GLI as an applet.


I have a binary release of Greenstone installed. Now I want to recompile it. What should I do?

It is assumed you are on Linux.

  1. Go to the folder where you unpacked the Greenstone binary distribution. For example, if this folder were called gsdl-2.80-unix:
    > cd gsdl-2.80-unix
  2. Run Install Shield again:
    > ./setupLinux.bin
  3. You already have Greenstone installed, therefore when it asks you whether you want to install it as a web server choose Custom Setup.
  4. Untick everything. Tick only the Source Code option. If it asks you whether you want to overwrite files you already have, press the No to All button.
  5. Go into $GSDLHOME -- the folder where you installed Greenstone.
    > cd $GSDLHOME

    See if there is a folder called indexers. If there is none (as is the case with Greenstone 2.80, but it is intended to be included in future Greenstone binary releases), then you need to get it. To get it from SVN (and into the $GSDLHOME folder where you now are):

    > svn co http://svn.greenstone.org/indexers/trunk indexers

    If you don't know what subversion/SVN is or don't have it installed, then you need to get the indexers folder by downloading the entire Source Distribution and compiling that, see Installing Greenstone 2 from source for Beginners#Source_distribution.

  6. Now that you are in $GSDLHOME and have the indexers folder in it, you can compile it all by typing the following in an xterm (note that each step can take a few minutes):
    > ./configure
    > make all
    > make install
    

    All going well, this would have compiled it. If you had any difficulties during compilation, see Installing Greenstone 2 from source for Beginners#Source_distribution.

  7. Still in $GSDLHOME, set up the environment for Greenstone:
    > source setup.bash
  8. To get the Greenstone Librarian Interface (GLI) working, you need to compile that. So go into the gli folder, which is located in $GSDLHOME, and compile GLI:
    > cd gli
    > ./makegli.sh
    > ./makejar.sh
    

    (The above would have compiled GLI and then the last line created the executable jar file from the compiled files.)
    You can run GLI with:

    > ./gli.sh

    Unfortunately there's a non-intrusive bug in Greenstone 2.80's GLI when installed from the source included in the binary distribution. If upon running GLI, you see the following on your xterm:

    Running the Greenstone Librarian Interface...
    /usr/share/themes/Clearlooks/gtk-2.0/gtkrc:60: Engine "clearlooks" is unsupported, ignoring
    Version: 2.80
    
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at javax.swing.plaf.synth.SynthContext.getPainter(SynthContext.java:181)
            ....
    

    You can correct the problem above, by

    • going to the directory $GSDLHOME/gli/src/org/greenstone/gatherer
    • opening its file GathererProg.java in a text editor
    • and replacing the line
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

    with:

    UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    • Save the file you just edited.
    • Finally, you need to recompile GLI again as explained just above.
  9. Assuming your web server is set up and running, you can view the pages Greenstone serves from the browser at http://WebServerName:WebServerPort/gsdl/cgi-bin/library
    where the WebServerName and WebServerPort are what you specified when you set up your web server.
    If you want to know more about this, see Setting up an Apache Web Server for Greenstone 2 Walkthrough