Advanced Installation Index Page - from here you can access GReenstone3 versions of this page.
For most users, the main Greenstone download (also called the "binary") with default settings is sufficient, and is very easy to install. However, there are some instances where you may want or need to go through a more advanced installation process:
Installation Option | Currency of Code | Code type | Description |
---|---|---|---|
Binary (the main download) | Release-Specific | Binary | This is the official, pre-compiled version of the software. It is platform-specific, and what most Greenstone users use. |
Source component | Release-Specific | Source Top-Up | if you already have the binary installed, you can top it up with the source component which provides the code that you can compile. Note that the source component belongs with a particular binary. This means it is static code (code as it was when the associated binary was released), not the latest version of the source code. |
Source distribution | Release-Specific | Source | if you want to compile the code for a particular binary release without installing the binary first, you can get the source distribution. Once more, this is static code: the code as it was when the binary was released. This is useful if you want to compile up Greenstone for a particular OS that we don't provide the binaries for, or if you had any issues with the pre-compiled binaries for your OS. It's also handy for if you want to locally patch up or modify the source code of a particular release that otherwise works fine for you. |
Source via SVN | Up-to-date | Source | SVN hosts the latest version of the Greenstone code. This is handy to get if you want to compile up Greenstone yourself and ensure you have the latest code in doing so. |
Important Note: Before proceeding, you're to set all instructed environment variables in the same terminal, unless explicitly stated otherwise.
Prerequisites for compiling the source component and source distribution on Windows:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
gs2build\bin\windows\perl
folder.
You will need to set up your environment to locate and use the above. For this purpose, it's handy to create a bat file that you can always run before compiling Greenstone. A template bat file follows. Adjust it to contain the paths to your installations of the above. We'll call this bat file setupenv.bat
and refer to it as such below.
@echo off :: Script to set up Java, ant, perl :: And set up Visual Studio for compiling the C/C++ in GS2 and GS3 :: First: change to using Windows short filenames to allow spaces in the filepath when compiling :: For this, need to cd into the folder where this script lives using the short filename path to this folder :: %0 is this script :: For the following 2 lines, the spaces between percent sign, tilde and what follows after need to be removed :: when writing the active command based on those lines. Spaces have been inserted in the following :: to prevent this script from causing errors about these commented out lines when running. :: % ~ dp gives the full path to the folder containing this script. :: % ~ s gives the windows short filename version :: Combine to get what we want. :: Note that this will leave the DOS prompt pointing to short filename of the folder cd "%~sdp0" set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_25 if not exist "%JAVA_HOME%" ( echo %JAVA_HOME% not found. Exiting... goto done ) :: From GS3.08 onwards, a Strawberry Perl is included with binaries and source distributions :: in your GS3's gs2build\bin\windows\perl folder set PERLPATH=C:\Users\Me\perl :: If you're compiling Greenstone 3, you'll also need ANT :: Note that GS3 binaries ship with Ant, located in ''packages\ant'' :: For GS3 source distributions, download your own ANT and extract it and set :: the environment variable below and adjust the PATH. set ANT_HOME=C:\Users\Me\ant :: Add the bin folders of Perl and Java (and Ant for GS3) to your PATH set PATH=%PERLPATH%\bin;%ANT_HOME%\bin;%JAVA_HOME%\bin;%PATH% :: If you want to compile GS2 with debugging on, you also need MS SDK and the following line: :: call "C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.cmd" :: Set up Visual studio environment. vcvars<num>.bat may be called vsvars<num>.bat :: Running VS in 64 bit mode doesn't work for GS2, need to run in 32 bit mode. :: (It may be apache httpd that needs 32 bit mode to compile.) :: For now only VS9.0 (VS2008) works :: FOR COMPILING GS2 on WINDOWS: :: OR FOR COMPILING GS3 ON 32 BIT WINDOWS: :: (if using 64 bit windows to compile GS3, comment out the following line by prefixing with two colons) call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat" :: FOR COMPILING GS3 ON 64 BIT WINDOWS, :: only confirmed to work with MS Visual Studio versions 9.0 and 12 so far: :: (if using 64 bit windows, uncomment the following line by removing the two colons at its start) :: call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" amd64 :: TO LOCATE YOUR vcvars32.bat (GS2/GS3) OR vcvarsall.bat (GS3) IN YOUR VISUAL STUDIO INSTALLATION: :: Different Visual Studio installations can contain the vcvars32.bat and/or vcvarsall.bat in locations :: different to the above examples. To locate your installation's instances of these scripts: :: Open a DOS prompt and cd/change directory into your Visual Studio folder. Then use the command: dir /b /s "*search-term*" :: and specify find the vcvars script by name, e.g. :: C:\Program Files (x86)\Microsoft Visual Studio>dir /b /s "*vcvarsall.bat*" :: If such a file exists within your Visual Studio installation, the prompt will return the location, e.g. :: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat :: Use this result in the "call" command above :: (and further, only for vcvarsall.bat, but not for vcvars32.bat, pass in: amd64), e.g. :: call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 :done
To make it easier for developers, a batch file containing placeholders you can adjust is already prepared and discussed at Source Installation on Windows.
setupenv.bat
cd C:\path\to\greenstone2
makegs2.bat
for 32 bit windows or makegs2x64.bat
for 64 bit windowscd gli
. Next, type: makegli.bat
. To recompile the GLI jar files, such as used for Remote Greenstone situations, type: makejar.bat
.
Note: Building collections that use lucene as their indexer requires Java. If you compiled up GS2 using a later version of Java than the version of JRE included in the binary (Java 7), then building a lucene collection may produce error messages about incompatible java versions. In such a case, rename your GS2 installation packages/jre
subfolder so that Greenstone no longer finds the bundled JRE. Before re-running GLI to rebuild your lucene collection, ensure that the Java you compiled GS2 with is in the environment (so that JAVA_HOME set to it and its bin
folder is on the PATH). Remember to use the same Java environment to launch this GS2 installation's applications in future.
setupenv.bat
cd C:\path\to\Greenstone2
makegs2.bat
for 32 bit windows or makegs2x64.bat
for 64 bit windowscd gli
. Next, type: makegli.bat
. Once it's done, you can run gli from the commandline with gli.bat
from inside the gli folder, or with gli\gli.bat
from the toplevel Greenstone installation folder.makejar.bat
.etc/main.cfg
file. Change the status
field value from disabled
to enabled
. In that case, you may also want to change the admin password for the Adminstration pages. Use a DOS prompt to run: gsicontrol.bat configure-admin
which will allow you to (re)set the password for username admin
(the default admin password is the same as the username).bin\windows
subfolder, so that you end up with an imagemagick
folder in there. Make sure it hasn't created an extra level of an imagemagick
subfolder on extraction, like bin\windows\imagemagick\imagemagick
. (The dll files should be at the bin\windows\imagemagick
level.)Prerequisites for compiling on Windows:
In addition to the Prerequisites for compiling Greenstone on Windows listed above, to install Greenstone from SVN source on Windows, you need to install svn.
(NOTE: Some of the prerequisite packages are available from greenstone's svn and are put into a subfolder called local
. For instructions on compiling up from source using the local
folder, refer to the Windows source installation page
Otherwise, proceed with the following.)
SVN, ANT, and JAVA must be put on PATH and Visual Studio must be set up for compiling the C/C++ code,
which can be accomplished using the file vcvars<number>.bat
, or vcvarsall.bat
passing in amd64
for 64 bit windows.
svn co https://svn.greenstone.org/main/trunk/greenstone2 gs2-svn cd gs2-svn
Then on 64 bit Windows run:
makegs2x64.bat
whereas on 32 bit Windows, you'd need to run:
makegs2.bat
Check out and compile GLI:
svn co https://svn.greenstone.org/main/trunk/gli cd gli makegli.bat makejar.bat
For more detailed instructions on source installation, please refer to the Windows source installation page.
In order to install Greenstone from source on Linux, you need to have the following installed:
cd <your greenstone folder> tar -xvzf <source-componentfile>
ext/gnome-lib-minimal
out of the way or rename it to something else.greenstone2-home/ext
folder../makegs2.sh gnome-lib cd gli ./makegli.sh ./makejar.sh
Note that some Linux machines don't need gnome-lib at all, in which case, the first compilation step above would just be ./makegs2.sh
. To tell whether your Linux machine needs gnome-lib, try compiling it without it first. If compilation fails during wvware, then you need gnome-lib. The Mac Mountain Lion and Leopard machines we tested it on required gnome-lib.
Note also that, starting with GS2.87 releases, -fPIC is automatically prepended to the CFLAGS environment variable on 64-bit unix systems by the ./makegs2.sh script, as this tends to be needed for compiling.
INSTRUCTIONS FOR OLDER VERSIONS OF GREENSTONE:
> cd gsdl-2.80-unix
> ./setupLinux.bin
> 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 the source install page.
> ./configure > make all > make install
All going well, this would have compiled it. If you had any difficulties during compilation, see the source install page.
> source setup.bash
> 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
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
with:
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
where the WebServerName and WebServerPort are what you specified when you set up your web server.
In the terminal:
where java
. Doing so should display a system location. Then run ls -la <java-location>
using that location value. If the result of this ls
operation shows that the location is a symlink, run ls -la <symlink>
on the symlink, until all symlinks are exhausted and you get to an actual location on the file system. Having found the actual location of java, you don't want the bin
directory, but its containing folder. Set this as JAVA_HOME. Locate and set ANT_HOME in similar manner.It may be easiest to create a bash script to set the above environment variables. Then you could run that script before compiling and, in a separate terminal, before running Greenstone applications.
export ANT_HOME=/path-to-your/ant export JAVA_HOME=/path-to-your/java export PATH=/path-to-your/svn/bin:$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
./makegs2.sh gnome-lib imagemagick cd gli ./makegli.sh ./makejar.sh
Note that some Linux machines don't need gnome-lib at all, in which case, the first compilation step above would just leave out the gnome-lib
parameter when running the makegs2.sh
script above. To tell whether your Linux machine needs gnome-lib, try compiling it without it first. If compilation fails during wvware, then you need gnome-lib. The Mac Mountain Lion and Leopard machines we tested it on required gnome-lib.
Note that if you already have imagemagick installed on your system or don't need it, you can leave out the imagemagick
parameter to the makegs2.sh
script.
etc/main.cfg
file. Change the status
field value from disabled
to enabled
. In that case, you may also want to change the admin password for the Adminstration pages. Use a DOS prompt to run: gsicontrol.bat configure-admin
which will allow you to (re)set the password for username admin
(the default admin password is the same as the username).svn co https://svn.greenstone.org/main/trunk/greenstone2 greenstone2 cd greenstone2 svn co https://svn.greenstone.org/main/trunk/gli
./makegs2.sh gnome-lib cd gli ./makegli.sh ./makejar.sh
etc/main.cfg
file. Change the status
field value from disabled
to enabled
. In that case, you may also want to change the admin password for the Adminstration pages. Use a DOS prompt to run: gsicontrol.bat configure-admin
which will allow you to (re)set the password for username admin
(the default admin password is the same as the username).For more detailed instructions on installation, please refer to the Linux GS3, Linux GS2 and Mac OS source installation pages.
> ./Greenstone-2.87-linux text-only ---------------------------- Extracting java installer... ---------------------------- Extraction Complete You can now run "java -jar greenstone.jar text" to run the installer from the command line >
For Linux, you will need to uninstall your Greenstone first and then reinstall it in the new location.
For Windows: In the case of GS2.83, if you move your Greenstone2 installation folder to some other location, make sure that you relocate it such that there are no spaces in its new path. For instance, "C:\Program Files\myfolder\greenstone2" contains a space between "Program" and "Files", which is not supported in version 2.83. In future versions of Greenstone, the spaces will not be a problem.
Once you've moved your Greenstone installation, there are a few further things to do to get it to work again: