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.

Installing Greenstone3

IMPORTANT NOTE: The SVN checkout urls have changed.

These new URLS may not yet have been updated in the rest of the document that follows.

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

The basic instructions are:

You need to have JAVA_HOME set to a SUN Java SDK, version 1.4 or greater.

You need Ant installed.

Use an x-term to run the following commands. (The * refers to a note below.)

cd greenstone3 ant <check the build.properties file to make sure variables are set properly, such as the port number you want to run Tomcat on> ant prepare * ant install

* Important Note: If you're on Linux, then after the 'ant prepare' step and before the 'ant install' step, you will need to visit http://trac.greenstone.org/browser/gs2-extensions/gnome-lib/trunk/ and download the gnome-lib-minimal package suited to your OS and the bit-architecture of your computer. For instance, if your machine was a linux 32-bit, then you'd get "gnome-lib-minimal-linux-x64.tar.gz". Put the download into your Greenstone installation's gs2build/ext folder and extract it. Finally, run the source devel.bash script in the extracted folder: cd gs2build/ext/gnome-lib-minimal source devel.bash cd ../../.. Move back into your Greenstone 3 installation directory to start compiling.

I get errors during compilation

Here are some work arounds that have worked for other people.

  • Errors about casting in HTOND and NTOHD in mgpp's text.pass.1 : add -fpermissive to the Makefile that calls netorder.h
  • See also Troubleshooting

How do I load Greenstone3 as a project into Eclipse?

There are two scenarios:

This is if you are developing Greenstone 3 code. In this case, you may want to create an Eclipse project with Greenstone 3 source code. (You will be updating and compiling Greenstone 3 code.)

This is for when you are writing a program that makes use of Greenstone 3 code but doesn't change Greenstone 3 itself. If so, you may only need to create an Eclipse Java project that makes calls to Greenstone 3 functionality.

For general information on using Eclipse with Java (including the plugin Subclipse that supports SVN version control), see Eclipse Java Basics

How do I install Greenstone3 on a Mac OS X?

Please see this page for installation notes specific to Mac OS X users.

How do I install the remote building facility for Greenstone3?

Follow the instructions on our Remote_Greenstone3 page.

How do I install Greenstone 3 on 64 bit Windows 7?

Please see this blog entry. Note this was written by a Greenstone user.

It contains the following instructions:

Requirements

  • Sun JDK 1.6.0_17 (jdk-6u17-windows-i586.exe)
  • Apache Tomcat 6.0.26 (apache-tomcat-6.0.26-windows-x86.zip)
  • Greenstone3 (greenstone-3.04-win32.exe)
    (Note: Although my machine and OS are 64-bit versions, the software above is all 32-bit).) 

The installation procedure is divided into the following main steps.

 1. Install Sun JDK
 2. Install Apache Tomcat
 3. Install Greenstone3
 4. Configure Greenstone
 5. Configure Tomcat
 6. Run Greenstone3

1. Sun JDK Installation

    * Double click on the jdk-6u17-windows-i586.exe file to install it into the default directory, which is C:\Program Files (x86)\Java.
    * Set JAVA_HOME.
          o Control Panel > System and Security > System > Advanced System Settings > Environment Variables.
          o Under the System Variables, click the “New…” button.
          o Enter values for the following two variables: Variable name: JAVA_HOME, and Variable value: C:\Program Files (x86)\Java\Jdk1.6.0_17.
          o Click the OK button to complete the setup.
    * Add Java to the PATH environment.
          o Under the System Variables, click to highlight the “Path” variable.
          o Click the “Edit…” button.
          o Add %JAVA_HOME%\bin to the end of Path’s variable value.
          o Click the OK, OK and OK buttons to complete the setup.
</code
2. Apache Tomcat Installation
<code>
    * Unzip the “apache-tomcat-6.0.26-windows-x86.zip” file into any directory
    * Copy the unzipped directory and paste it into C:\, resulting in C:\apache-tomcat-6.0.26 directory.
    * Set up Apache Tomcat home path
          o Go to the Environment Variables, using the same approach as used in setting JAVA_HOME above.
          o Click the “New…” button.
          o Enter values for the following two variables: Variable name: CATALINA_HOME, and Variable value: C:\apache-tomcat-6.0.26.
          o Click the OK, OK and OK buttons to complete the setup.
    * Test the Apache Tomcat installation
          o Open a web browser
          o Type: http://localhost:8080/ in the address bar.
          o The Apache Tomcat startup page should be displayed.

3. Greenstone3 Installation

    * Double click on the greenstone-3.04-win32.exe file.
    * Install it into C:\Users\YourUserName directory where YourUserName is the user name used in your machine such as John.
    * During the installation, install everything but exclude Apache-Tomcat (by unchecking the textbox) that comes with Greenstone3.
    * The installed directory would be C:\Users\YourUserName\Greenstone3.
<code>
4. Greenstone3 Configuration
<code>
    * Edit the greenstone3.xml in the C:\Users\YourUserName\Greenstone3\resources\web\tomcat by replacing @gsdl3webhome@ with C:\Users\YourUserName\Greenstone3\web for the docBase= variable.
    * Copy and paste the edited greenstone3.xml file into C:\apache-tomecat-6.0.26\conf\Catalina\localhost.
    * Edit build.properties file in the C:\Users\YourUserName\Greenstone3 directory by adding "C:\apache-tomcat-6.0.26" to the tomcat.installed.path variable in the file 
      (This step is required for running Greenstone Librarian Interface (GLI)).

5. Apache Tomcat Configuration

    * Copy and paste all the .dll files in the C:\Users\YourUserName\Greenstone3\lib\jni directory into C:\apache-tomcat-6.0.26\bin directory.
    * Copy and paste all the .jar files in the C:\Users\YourUserName\Greenstone3\lib\jni directory into C:\apache-tomcat-6.0.26\lib directory.

      (Note: I know that there is a better way to set up these .dll and .jar files for Tomcat server, but I still do not know how to do it yet.) 

6. Running Greenstone3

    * Start the Apache Tomcat server
          o Open a command prompt.
          o Issue a command to change directory to the C:\apache-tomcat-6.0.26\bin
          o Issue the following command: startup.bat
    * Open the Greenstone3 web server
          o Open a web browser
          o Type: http://localhost:8080/greenstone3/ in the address bar.
          o The Greenstone 3 welcome page should shown up. On this page, there are four hypertext links.
                + Run the test servlet.
                + Run the default library servlet.
                + Run the ‘standard’ servlet.
                + Run the gateway servlet.
          o The top three links should be working well. The bottom link requires Apache Axis to be installed. (Note: I have not tried it.)
    * Run the Greenstone Librarian Interface (GLI)
          o Open a command prompt.
          o Issue a command to change directory to C:\Users\YourUserName\gli directory.
          o Issue the following command: gli.bat. The GLI should be activated successfully.