Greenstone 3 Installation on Window 7 (64-bit)

In this blog, I’d like to share my experience on installing Greenstone3, a digital library software for building and distributing digital library collections, in my 64-bit version of Windows 7 machine. My installation approach may certainly not be a good one, but it can get the software up and running.

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.
    • Control Panel > System and Security > System > Advanced System Settings > Environment Variables.
    • Under the System Variables, click the “New…” button.
    • Enter values for the following two variables: Variable name: JAVA_HOME, and Variable value: C:\Program Files (x86)\Java\Jdk1.6.0_17.
    • Click the OK button to complete the setup.
  • Add Java to the PATH environment.
    • Under the System Variables, click to highlight the “Path” variable.
    • Click the “Edit…” button.
    • Add %JAVA_HOME%\bin to the end of Path’s variable value.
    • Click the OK, OK and OK buttons to complete the setup.

2. Apache Tomcat Installation

  • 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
    • Go to the Environment Variables, using the same approach as used in setting JAVA_HOME above.
    • Click the “New…” button.
    • Enter values for the following two variables: Variable name: CATALINA_HOME, and Variable value: C:\apache-tomcat-6.0.26.
    • Click the OK, OK and OK buttons to complete the setup.
  • Test the Apache Tomcat installation
    • Open a web browser
    • Type: http://localhost:8080/ in the address bar.
    • 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.

4. Greenstone3 Configuration

  • 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
    • Open a command prompt.
    • Issue a command to change directory to the C:\apache-tomcat-6.0.26\bin
    • Issue the following command: startup.bat
  • Open the Greenstone3 web server
    • Open a web browser
    • Type: http://localhost:8080/greenstone3/ in the address bar.
    • 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.
    • 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)
    • Open a command prompt.
    • Issue a command to change directory to C:\Users\YourUserName\gli directory.
    • Issue the following command: gli.bat. The GLI should be activated successfully.
  • (Note: I am still not able to run GLI from All Programs > Greenstone-3.04 > Greenstone Librarian Interface (GLI).)

Concluding Remarks

I was spending so much time to get this Greenstone3 up and running on my 64-bit version of Windows 7 machine, a lot of googling and hair pulling. Well, I am glad that I can get it working eventually although some more things need to be done such as running GLI from the All Programs menu of Windows 7. Anyway, I hope that this blog will save you guys time and resources. Have fun and have a good day.

This entry was posted in Uncategorized. Bookmark the permalink.

11 Responses to Greenstone 3 Installation on Window 7 (64-bit)

  1. Thanks mrtextminer,

    This was very helpful and I got yo the point of previewing the collection which throws this exception:

    HTTP Status 500 –

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    javax.servlet.ServletException: Servlet.init() for servlet gs2-library threw exception
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
    org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
    org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
    java.lang.Thread.run(Thread.java:619)

    root cause

    java.lang.NoClassDefFoundError: au/com/pharos/gdbm/GdbmException
    org.greenstone.gsdl3.util.SimpleCollectionDatabase.(SimpleCollectionDatabase.java:36)
    org.greenstone.gsdl3.service.OAIPMH.configure(OAIPMH.java:110)
    org.greenstone.gsdl3.collection.ServiceCluster.configureServiceRack(ServiceCluster.java:330)
    org.greenstone.gsdl3.collection.Collection.configure(Collection.java:112)
    org.greenstone.gsdl3.core.MessageRouter.activateCollectionByName(MessageRouter.java:604)
    org.greenstone.gsdl3.core.MessageRouter.configureCollections(MessageRouter.java:558)
    org.greenstone.gsdl3.core.MessageRouter.configureLocalSite(MessageRouter.java:418)
    org.greenstone.gsdl3.core.MessageRouter.configure(MessageRouter.java:195)
    org.greenstone.gsdl3.LibraryServlet.init(LibraryServlet.java:167)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
    org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
    org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
    java.lang.Thread.run(Thread.java:619)

    root cause

    java.lang.ClassNotFoundException: au.com.pharos.gdbm.GdbmException
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
    org.greenstone.gsdl3.util.SimpleCollectionDatabase.(SimpleCollectionDatabase.java:36)
    org.greenstone.gsdl3.service.OAIPMH.configure(OAIPMH.java:110)
    org.greenstone.gsdl3.collection.ServiceCluster.configureServiceRack(ServiceCluster.java:330)
    org.greenstone.gsdl3.collection.Collection.configure(Collection.java:112)
    org.greenstone.gsdl3.core.MessageRouter.activateCollectionByName(MessageRouter.java:604)
    org.greenstone.gsdl3.core.MessageRouter.configureCollections(MessageRouter.java:558)
    org.greenstone.gsdl3.core.MessageRouter.configureLocalSite(MessageRouter.java:418)
    org.greenstone.gsdl3.core.MessageRouter.configure(MessageRouter.java:195)
    org.greenstone.gsdl3.LibraryServlet.init(LibraryServlet.java:167)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
    org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
    org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
    java.lang.Thread.run(Thread.java:619)

    Also there should be noted that at step 4 the path presented there has no web subdirectory.
    Also I had to run clean.bat in order to start the GLI.
    Unfortunately my limited knowledge put me to this stall. Any ideas?

    Thank you once again for all the time you spent in order for me to build upon your experience.

    Kind regards

  2. florence says:

    Thanks so much ……i’m going to try it out your style. Lemme know if u have tried it out on a client server environment

  3. Michèle says:

    Thanks for clear and detailed explanation. Thanks to you I could install Greenstone3 on my Windows7.
    But … I have the same problem as Nicolaie Constantinescu.
    Also, when I create a catalog and click on the preview button, I get the same error-message.
    Does anybody have a solution to that error ?

    Thanks for any help !

  4. Katherine Don says:

    Hi

    I am a Greenstone developer.
    Can I copy these instructions onto our wiki at wiki.greenstone.org?

    Thanks,
    Katherine Don

    • mrtextminer says:

      Hi Katherine,
      Yes, you can. It also would be nice if you could put a little thing referring to my page.

      • Katherine Don says:

        Thanks. We’ll link to your page also. I just would like to put the text into the wiki in case your page disappears or changes address etc. Do you have a name to acknowledge you by, or just Mr Text Miner

      • mrtextminer says:

        It’s fine by “MrTextminer”. Thanks.

  5. Divino Jr says:

    Hi all,

    I have the same problem as Nicolaie Constantinescu; but exists one solution or the installation of greenstone only is possible in windows 32 bits?

  6. Farley says:

    I followed these instructions to the letter and still could not get Greenstone v. 2.83 or 3.04 to install in a manner that allowed the Librarian Interface to initialize. I installed v. 2.84 rc2 onto my 64-bit Windows 7 platform and it worked reasonably well. I managed to build a test collection and burn it to a CD. I could not open the CD on my home computer but it opened on a 32-bit Windows XP platform with minimal errors. I have not noticed any other bugs so far.

  7. Dat says:

    Thanks. But, the GLI is not run, help me!!!!

Leave a reply to florence Cancel reply