Table of Contents
The Greenstone Server
The server is what allows your Greenstone library to be viewed in a web browser. As the server included with Greenstone is ready to run out of the box you will likely have little reason to worry about it while you are building and customizing your Greenstone library.
The server will start automatically when you run the GLI, allowing you to view collections after
you build them, and as you modify them. You can also start the server individually, as well (on
Start → All Programs → Greenstone → Greenstone Server). This can be done whether
the GLI is running or not, and is useful as it:
- provides access to the server settings, and
- allows you to easily restart the server (which is necessary if you make changes to certain files in your installation),
making this option helpful during customization. The server can also be started by running gs2-server.sh/bat or gs3-server.sh/bat from the main greenstone installation folder.
If you find that your favorite web browser does not work with Greenstone, please contact us via the mailing list.
The rest of this page provides some basic information about the servers packaged with Greenstone; more technical information is available on the Developer's server page.
The web server
Both Greenstone 2 and 3 use an external webserver, Apache for Greenstone2, Tomcat for Greenstone3. These come packaged with Greenstone in its installers, so should be set up ready to go once you have installed the software.
====Server Options==== After you have installed Greenstone3 and started the Greenstone server, you can change a number of server options. Most users will probably not need to do this. For those who do, the options can be viewed and changed by clicking File → Settings… in the Greenstone server window.
- Tomcat Port This option selects the port number for running tomcat. For more information and for help choosing a Tomcat Port, see Tomcat Port and Tomcat Shutdown Port in the Installation section.
- Enter the library automatically Check this option if you want your Greenstone library to be opened automatically in your selected browser each time you start up the Greenstone3 server.
- Servlet This option specifies how your Greenstone library will be viewed. The library option views the Greenstone library with the new Greenstone3 look-and-feel. The classic-library option views the library with the 'classic' Greenstone2 look-and-feel. The tester option should only be used to test the installation of Greenstone and the Tomcat web server, to ensure that servlets can be run properly. And the gateway option views collections hosted on a SOAP web service. This option is helpful for developers who want to see an example of collections being accessed via the SOAP protocol. For more information, see section 6.1 of the Greenstone3 manual located at
docs/manual/manual.pdfof your Greenstone3 installation directory.
- Enter library using This option chooses what happens when you click the 'Enter Library' button in the Greenstone3 server window. You can choose to have the library launched in the default web browser for you computer system, or another browser located on your computer. If you choose the latter option, click browse and open the web browser executable file (e.g., for Mozilla Firefox, open the 'firefox'(Linux) or 'firefox.exe'(windows) binary file.
Greenstone 2 runs using the Apache web server. Greenstone running on Apache is called the web library. On Windows, a second web server option is available, the local library. This is a standalone Greenstone prgram with a built-in webserver.
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).
=== Windows local library ===
If your computer prompts you to access the internet, this is simply the built-in webserver built sending a message to your computer's networking software to make sure it's functioning correctly. If this occurs, in most situations, you can simply cancel the dialog box and (if required) press your browser's reload button to continue.
If when starting up the Windows local library, your web browser starts up, but your home page never gets loaded or you get an error message:
- Check your web browser's internet proxy settings and turn proxies off (use Edit preferences on Netscape or Internet options on Explorer).
- If Internet Explorer gives a message saying "The page cannot be displayed" and "Cannot find server or DNS error" at the bottom of the page, check in your network settings that your computer's name is set up correctly. For example, if there is a DNS suffix entered in your TCP/IP properties (in the Control Panel), make sure that your host name and suffix are correct for your computer. If the server is running correctly, you should be able to connect by visiting http://127.0.0.1/ in a web browser on the same machine that the local library is running on.
=== IIS ===
We don't use Greenstone with IIS, test Greenstone with it, or recommend it. Apache is included with Greenstone 2 binaries. It has a much better security record, and of course it's open source.
However, if you would like to run Greenstone 2 using IIS, please see this page. The instructions were written for 2.82 but may still be useful.
Making Greenstone accessible from the Internet
In order to make your Greenstone library accessible from the internet, you need a computer that is permanently connected to the internet. If your organization does not have this kind of computer, you can pay a web hosting company to host Greenstone for you. See below.
Once you have access to this computer you need to install Greenstone on it. If you are using Greenstone2 on Windows, make sure that you use the web library, not the local library.
Lastly, copy your collections into this Greenstone installation and check that everything is now accessible from the web.
Using a web hosting service
Answer contributed to the mailing list by Diego Spano.
How easy it is to install Greenstone (GS) will depend a lot on your internet hosting company. You will need to find one that will install Greenstone for you, or allow you to install it yourself, and allow CGI executables to run. Some hosting companies (particuarly cheap ones) do not provide these services.
To install Greenstone on a web server yourself, you need terminal access to your hosting company through ssh. When you want to acquire a domain, the company will offer you a variety of options but you have to take in account that you need a dedicated server (aka Virtual private server). A dedicated server allows you to manage what to install and have the freedom of configuring it as you want because you have root access.
You will need to install Greenstone on the server"
- Connect via ssh to the server
- Download Greenstone into the server with wget command or just download it in your computer and upload the installer with FTP or WINSCP.
- Install GS the same way you install in your computer. It is the same installer for local computer and for remote one. You can install in text only mode, see here.
- Once you have Greenstone installed and running, then you can copy over your collections and any modifications.
Greenstone3 needs Tomcat rather than Apache.
TODO: This section needs work
- Does the hosting service have Tomcat already installed? In that case you can probably just copy the files to the specified location.
- If you have full permissions to do everything just install Greenstone3 as usual.
- We have some notes for installation on different server types, see the various README files at https://trac.greenstone.org/browser/local/greenstone3/linux-64bit
Some points to consider when trying to install Greenstone2.
- It is very common that your Apache is already installed in your server. So you have to decide if you modify the main Apache configuration to run GS or if you will use GS Apache instead. The main advantage of using GS Apache is that you have it configured because the installer do that job. To check if you have a running Apache installed on the server, you can execute the following on the server (if it's a Linux machine):
ps -aux | grep httpd" or "ps -aux | grep apache2
- If you want to modify your installed Apache, you have to edit /etc/apache2/apache2.conf (or /etc/httpd/httpd.conf) and add the two GS blocks there and restart the service.
- If you want to run GS Apache you only have to run /greenstone installation folder/apache-httpd/linux/bin/apachectl start and it should run.
- Try this url in your browser: http://server_ip_or_host_name/greenstone/cgi-bin/library.cgi. Does it show anything?
- Sometimes hosted web servers have some security restrictions for running cgi scripts. You have to check it if you get any error.
Troubleshooting You've configured Apache, but when you try to reach the URL you are redirected to the hosting web page. What kind of hosting did you buy? Perhaps it has Apache running and you are trying to run GS Apache at the same time, this is not possible unless both Apache are in different ports or just stopping one to run the other.
- How to Host Greenstone Libraries on the Amazon AWS Cloud Service - instructions by Bob Schmitt with thanks to Diego Spano as well.