User Tools

Site Tools


en:user_advanced:installation_312

This is an old revision of the document!


Advanced Installation: 3.12

TODO: currently just copied from 3.11 version. update for 3.12

For installation instructions for older versions of Greenstone, please see the Advanced Users Installation Index 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:

  • If you want to compile up Greenstone for a particular OS that we don't provide the binaries for
  • If you had any issues with the pre-compiled binaries for your operating system
  • If you want to locally patch up or modify the source code of a particular release that otherwise works fine for you
  • If you want up-to-date code
Installation OptionCurrency of CodeCode typeDescription
Binary (the main download)Release-SpecificBinaryThis is the official, pre-compiled version of the software. It is platform-specific, and what most Greenstone users use.
Source componentRelease-SpecificSource Top-Upif 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 distributionRelease-SpecificSourceif 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 SVNUp-to-dateSourceSVN 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.

Windows

Prerequisites for compiling the source component and source distribution on Windows:

  • Java: JDK 8 is the minimum version needed. For compiling on Windows 64 bit, you will need the 64 bit version of JDK.
    • If you have a JDK already installed, please set the JAVA_HOME variable in local/gs3-setup.bat
    • If you don't have a JDK, please run get-selfcontained-jdk.bat in the ext-cli folder - this will download a JDK 11.
  • Microsoft Visual Studio (8 or later) - for C++ compiling.
    • Please edit local/gs3-devel.bat and check that the paths to Visual Studio and the vcvars script are correct
  • Apache Ant: Version??
    • If you don't already have Ant installed, please run get-selfcontained-ant.bat in the ext-cli folder
  • PERL: if you're using GS3.07 or earlier, get ActivePerl for Windows. From GS3.08 onwards, binaries and source distributions come with a Strawberry Perl located in the GS3's gs2build\bin\windows\perl folder.
  • (If you want to compile GS3 with debugging on, you will need Microsoft SDK)
    • ?? add this to gs3-devel.bat?? call "C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.cmd"

Source Component

  1. Get the source component zip file from the downloads page.
  2. Unzip it directly into your Greenstone installation folder, make sure not to create intermediary folders. If Windows prompts you about whether you want existing folders merged (and existing files replaced), tick the box to confirm for all and click in the affirmative.
  3. Open a DOS prompt to run the following scripts and commands:
  4. Go into your Greenstone installation folder, cd C:\path\to\greenstone3, and run gs3-devel.bat. This will allow Greenstone to unzip zip files. It will also provide an ANT installation in case you don't have one, since the GS3 binary comes with ant. It runs your local scripts to set up the Visual Studio environment.
  5. The Java Runtime (JRE) included with Greenstone 3 binaries is a 32 bit Java 8 runtime. This means that if the Windows machine that you're recompiling the binary with the source component on is not 32 bit Java 7 too, then you will need to do the following before compiling
    • rename packages\jre to something else, so that when Greenstone runs after compiling, it uses your system Java rather than the old 32 bit JRE v7.
    • run ant distclean from the toplevel Greenstone installation folder, to clear all the older compile products created by compiling with 32 bit Java 7.
      If you see the following error message
           [exec] Could Not Find GS3\gs2build\common-src\src\gdbmedit\gdbmdel\*.obj
           [exec] Could Not Find GS3\gs2build\common-src\src\gdbmedit\gdbmdel\gdbmdel.exe
           [exec]     cd "GS3\gs2build\common-src"
           [exec]     cd src\gdbmedit\gdbmdel
           [exec]     "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.11.25503\bin\HostX64\x6
      4\nmake.exe" /f win32.mak GSDLHOME="GS3\gs2build" clean
           [exec]     del *.obj
           [exec]     del gdbmdel.exe
           [exec]     cd "GS3\gs2build\common-src"
           [exec]     cd indexers
           [exec]     set DEBUG=0
           [exec]     set VISUAL_STUDIO_MAJORVERSION=
           [exec]     set ENABLE_MG=1
           [exec]     set ENABLE_MGPP=1
           [exec]     set ENABLE_LUCENE=1
           [exec]     call winMake.bat clean
           [exec] GS3\gs2build\common-src\indexers\bin\*, Are you sure (Y/N)?
      >>>>     [exec] 14 was unexpected at this time. <<<<<<<<<<<<<<<<<<<<
           [exec] NMAKE : fatal error U1077: 'call' : return code '0xff'
           [exec] Stop.
      
      BUILD FAILED
      GS3\build.xml:4104: exec returned: 2

      Edit your GS3\gs2build\common-src\indexers\winMake.bat script by commenting out the following line in it

      ::if %VISUAL_STUDIO_MAJORVERSION% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip


      If you see a failure message about being unable to delete a file called 'cp.jar', run del \path\to\cp.jar manually from the command line for the exact file path listed. Then re-run ant distclean. There are several cp.jar files in different locations of the GS3 installation, any or all of which can cause this failure message. So keep repeating the cycle of re-running ant distclean then manually running del on any cp.jar file listed in any failure message, until the ant distclean step finally succeeds (so without failure messages). This issue may be due to Windows having filelocks on the cp.jar files.

    • you may also want to want to delete gli\jar and gli\classes\org, if they exist, to clear up GLI before recompiling.
  6. Finally, you can compile Greenstone 3. Still in your Greenstone installation folder, run ant install.
  7. Grab the strawberry perl-with-cpan for Windows from https://trac.greenstone.org/browser/gs2-extensions/perl-with-cpan/trunk/strawberry-perl-5.32.1.1-MSWin32-x86-multi-thread.zip
    and unzip it into gs2build/bin/windows. Rename the unzipped folder to strawberry-perl, and make sure it doesn't contain a subfolder starting strawberry-perl (if it does, the strawberry-perl subfolder should be the one directly under gs2build/bin/windows).

To run GS3 after re-compiling:

To run GLI after recompiling your binary on a 64 bit Windows machine, you need the same version of JDK or JRE (and for the same bit architecture, 32 or 64 bit) as that you used to compile up Greenstone 3. You will need this Java's bin subfolder on your PATH. You'll also need the bin subfolder of ANT on the PATH.

Note if you want to use the bundled JRE for Windows 64 bit:

To run GLI after recompiling your binary on a 64 bit Windows machine, you need JDK 8 or JRE 8 (for pre-GS3.11 you'd need JDK 7 else JRE 7) for 64 bit set up in your environment, since the JRE included with the Greenstone Windows binary is for 32 bit, as the Greenstone Windows binary itself is 32 bit. Otherwise, the problem seen when running the 64-bit recompiled GS3 server with the 32-bit JRE included in GS3 binaries is a tomcat error explaining the discrepancy between the two architectures.

Therefore, to run GLI after compiling GS3 for 64 bit, add the bin folder of JRE for 64 bit to the PATH, or set JAVA_HOME to JDK 64 bit and add its bin folder to the PATH. Then run GLI in this environment.

Source Distribution

  1. Get the source distribution zip file from the downloads page.
  2. Unzip it in a location with no spaces in the filepath.
  3. Open a DOS prompt to run the following scripts and commands:
  4. Set up the environment for compiling Greenstone by running the setupenv.bat script described above: setupenv.bat. (For 64-bit Windows, make sure the script sets JAVA_HOME to a 64-bit JDK7, and adds its bin folder to the PATH, and that the script then calls vsvarsall.bat amd64 of your Visual Studio. VS Version 9 has been tested to work.)
  5. Go into your Greenstone 3 installation folder, cd C:\path\to\Greenstone3\, and run gs3-setup.bat.
  6. Edit your GS3\gs2build\common-src\indexers\winMake.bat script by commenting out the following line in it by prefixing 2 colon signs (::) to the line
    if %VISUAL_STUDIO_MAJORVERSION% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip

    So it looks as follows, then save the script file:

    ::if %VISUAL_STUDIO_MAJORVERSION% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip
  7. Now you can finally compile Greenstone 3. Still in your Greenstone installation folder, run ant install.
  8. It can take several minutes to compile up.
  9. If you don't already have an imagemagick installed on your system and want to have imagemagick in your GS installation, as imagemagick is used to create thumbnail and screenview size images from your full size images, then grab the pre-compiled imagemagick Windows binary from http://trac.greenstone.org/export/head/gs2-extensions/imagemagick/trunk/imagemagick-windows.zip and unzip it into your compiled up GS3 source distribution folder's gs2build\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 gs2build\bin\windows\imagemagick\imagemagick. (The dll files should be at the gs2build\bin\windows\imagemagick level.)

Notes for Windows 64 bit:

To run GLI or the gs3-server after compiling the source code on a 64 bit Windows machine, you need your environment to be set up with JDK 8 or JRE 8 (or JDK 7+ else JRE 7+ for Greenstone versions prior to GS3.11) for 64-bit and Ant: set the JAVA_HOME environment variable to your 64 bit JDK and add the JDK's bin folder to the PATH. Also set the ANT_HOME environment variable and add its bin folder to the PATH. Then run GLI or gs2-server in this environment using the gli.bat and gs2-server.bat scripts.

Uptodate source code from SVN

Prerequisites for compiling on Windows:

  • Java JDK 6.x or later, JDK 7+ for GS3.06 onwards, and JDK 8 for GS3.11 onwards
  • PERL (ActivePerl for Windows
  • Visual Studio 8 or later
  • (If you want to compile GS2 or GS3 with debugging on, you will need Microsoft SDK)
  • Additionally: Apache ANT for Greenstone3

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.

Run the following:

svn co https://svn.greenstone.org/main/trunk/greenstone3 gs3-svn
cd gs3-svn
ant
ant prepare
ant install

For more detailed instructions on source installation, please refer to the Windows source installation page.

Linux/Mac

In order to install Greenstone from source on Linux, you need to have the following installed:

  • ANT
  • Java JDK. JDK 7 for Greenstone 3.06 and onwards.
    WARNING: But do not use Oracle's JDK version 1.8.0_161 as it is problematic: failing to compile GS3 and also failing to successfully run the solr web servlet in GS3 binaries. We found that Oracle's JDK versions 1.8.0_144 and 1.8.0_191 worked for us.
  • C/C++ compiler: XCode on Mac, gcc/g++ on Linux

Source Component

  1. Download and extract the Source Component for your Operating System into the top-level folder of your Greenstone 3 binary installation. For Linux/Mac, download the tar.gz version as zip doesn't preserve necessary file permissions.
  2. Set up ant and Java: set JAVA_HOME (to JDK 7 for Greenstone 3.06, JDK 8 for Greenstone 3.11 onwards) and add its bin folder to the PATH. If you're on a 64 bit machine, you'll need a JDK for 64 bit machines, if you're on a 32 bit machine, you will need a JDK for 32 bit machines. Set ANT_HOME and add its bin folder to the PATH. If you don't already have ant installed, the Greenstone 3 binary comes with one in its packages/ant folder. Set that to ANT_HOME, and add its bin subfolder to the PATH.
    export JAVA_HOME=/path/to/your/jdk7
    export ANT_HOME=/path/to/GS3/packages/ant
    export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH

    If you're on a Mac OS version anywhere from 10.11/El Capitan until Mojava (and possibly Catalina), set CFLAGS, CXXFLAGS and JNIFLAGS as follows:

    export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"
    export CXXFLAGS="$CXXFLAGS $CFLAGS"
    export JNICFLAGS="$JNICFLAGS $CFLAGS"

    Since GS3.08 and until GS3.10, if you're on 64 bit linux, you will also need to add -fPIC to the CFLAGS and CXXFLAGS environment variables:

    export CFLAGS="-fPIC $CFLAGS"
    export CXXFLAGS="-fPIC $CXXFLAGS"

    If at any point you run source ./gs3-setup.sh before compiling, you will have to set up the Java JDK environment again, because the gs3-setup script will make the included JRE the default Java.

  3. The Java Runtime (JRE) included in binaries from Greenstone 3.07 onward is version 7 and version 8 for Greenstone 3.11 onward. For 32 bit linux binaries, the included JRE is 32 bit and for 64 bit linux binaries the JRE is 64 bit. If you have set up a system Java of a version different from the JRE included, then
    • rename the packages\jre folder to something else, so that when Greenstone runs after compiling, it uses your system Java rather than the old 32 bit JRE v7.
    • run ant distclean from the toplevel Greenstone installation folder, to clear all the older compile products that were compiled with Java 7.
    • you may also want to want to delete gli/jar and gli/classes/org, if they exist, to clear up GLI before recompiling.
  4. Most of the linux and mac machines we tested require the gnome-lib extension. Without it, if compilation fails with an error message about wvware, then it means you need the gnome-lib extension.
    The Greenstone 3 binaries on Mac come with a reduced gnome-lib-minimal that is not sufficient for compiling. Move this out of the way first: rename or move away your Greenstone 3 installed folder's gs2build/ext/gnome-lib-minimal folder.
    You can grab the gnome-lib-minimal package by visiting http://trac.greenstone.org/browser/gs2-extensions/gnome-lib/trunk, selecting the link to the gnome-lib-minimal version for your operating system and architecture, then clicking on the download link on the subsequent page. Download it into your Greenstone 3's gs2build/ext folder.
  5. Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:
    cd gs2build/ext
    tar -xvzf gnome-lib-minimal-<your-OS-version>.tar.gz
    cd gnome-lib-minimal
    source ./devel.bash
    cd ../../..
  6. In the same terminal, you can now finally run ant install from the toplevel folder of the Greenstone 3 installation to start compiling. It can take several minutes.
    Note: If at this stage, compilation fails at Perl's XMLParser with the error message "Only one of PREFIX or INSTALL_BASE can be given. Not both.", then in the same terminal check if the INSTALL_BASE environment variable is set, and if it is, unset it (and PERL_MM_OPT if it was set to this) and re-run ant install:
    > env | grep INSTALL
    PERL_MM_OPT=INSTALL_BASE=/something.../
    > export INSTALL_BASE=
    > export PERL_MM_OPT=
    > ant install

Note:

The gnome-lib environment may conflict with graphical applications on Linux systems. After compiling, open a fresh terminal to run GLI or other graphical applications. But make sure the new terminal has the environment set up for Java and Ant too before running any Greenstone applications like the Greenstone Server (gs3-server) and GLI.

Source Distribution

In the terminal:

  • set JAVA_HOME. For GS3, also set ANT_HOME
    To set these, you can find out where java is installed on your unix system by first running 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.
  • Add svn/bin to PATH
  • Add JAVA_HOME/bin to PATH
  • For GS3, also add ANT_HOME/bin to PATH

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
  1. Download the Source Distribution for your Operating System and extract it into the location where you want Greenstone installed. For Linux/Mac, download the tar.gz version as zip doesn't preserve necessary file permissions.
  2. Go into your extracted source distribution's folder's gs2build/bin/<OS> subfolder, where OS can be either windows/linux/darwin (for mac). There, svn export the perl-with-cpan tarball for your OS, by running the appropriate command for your OS from the following

    LINUX 64: svn export https://svn.greenstone.org/gs2-extensions/perl-with-cpan/trunk/perl-5.32.1-x86_64-linux-thread-multi.tar.gz .
    LINUX 32:svn export https://svn.greenstone.org/gs2-extensions/perl-with-cpan/trunk/perl-5.32.1-i686-linux-gnu-thread-multi.tar.gz .
    MAC (Mojave+): svn export https://svn.greenstone.org/gs2-extensions/perl-with-cpan/trunk/perl-5.32.1-darwin-thread-multi-2level.tar.gz .
    WINDOWS: svn export https://svn.greenstone.org/gs2-extensions/perl-with-cpan/trunk/strawberry-perl-5.32.1.1-MSWin32-x86-multi-thread.zip .

    Next, extract the downloaded perl-with-cpan archive.

    Then on Windows, rename the extracted folder to strawberry-perl:
    mv perl-5.32.1 strawberry-perl
    and on linux and mac, rename the extracted directory to perl:
    mv perl-5.32.1 perl

    You can now delete the perl-with-cpan tarballl/zip.

  3. Make sure JAVA_HOME is set (to JDK 7 for Greenstone 3.06, JDK 8 from Greenstone 3.11 onwards) and that its bin folder is added to the PATH. If you're on a 64 bit machine you need a JDK for 64 bit machines, if you're on a 32 bit machine, you will need a JDK for 32 bit machines. Also set ANT_HOME to an ant installation and add its bin folder to the PATH.
  4. Most of the linux and mac machines we tested require the gnome-lib extension. Without it, if compiling fails with an error message about wvware, then it means you need the gnome-lib extension. You can grab it by visiting http://trac.greenstone.org/browser/gs2-extensions/gnome-lib/trunk, selecting the link to the gnome-lib-minimal version for your operating system and architecture, then clicking on the download link on the subsequent page. Download it into your extracted Greenstone 3's gs2build/ext folder.
  5. Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:
    cd gs2build/ext
    cd gnome-lib 
    # gnome-lib can take longer to compile. 
    # Alternatively, if you had internet access and had grabbed the gnome-lib-minimal tarball
    # as per instructions above, then run the following commands: 
    #mv gnome-lib gnome-lib.orig
    #tar -xvzf gnome-lib-minimal-<your-OS-version>.tar.gz 
    #cd gnome-lib-minimal
    source ./devel.bash
    cd ../../..
  6. If you're on a Mac OS version anywhere from 10.11/El Capitan until Mojava (and possibly Catalina), set CFLAGS, CXXFLAGS and JNIFLAGS as follows:
    export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"
    export CXXFLAGS="$CXXFLAGS $CFLAGS"
    export JNICFLAGS="$JNICFLAGS $CFLAGS"

    Since GS3.08 and upto and including GS3.10, if you're on 64 bit linux, you will also need to add -fPIC to the CFLAGS and CXXFLAGS environment variables:

    export CFLAGS="-fPIC $CFLAGS"
    export CXXFLAGS="-fPIC $CXXFLAGS"
  7. In the same terminal, you can now finally run ant install from the toplevel folder of your extracted Greenstone 3 installation to start compilation. It can take several minutes.
    Note: If at this stage, compilation fails at Perl's XMLParser with the error message "Only one of PREFIX or INSTALL_BASE can be given. Not both.", then in the same terminal check if the INSTALL_BASE environment variable is set, and if it is, unset it (and PERL_MM_OPT if it was set to this) and re-run ant install:
    > env | grep INSTALL
    PERL_MM_OPT=INSTALL_BASE=/something.../
    > export INSTALL_BASE=
    > export PERL_MM_OPT=
    > ant install
  8. For Mac OS, from El Capitan onwards: If you don't already have an imagemagick installed on your system and want to have imagemagick in your GS installation, as imagemagick is used to create thumbnail and screenview size images from your full size images, then we found that the pre-compiled imagemagick binary at https://trac.greenstone.org/export/head/gs2-extensions/imagemagick/trunk/imagemagick-darwin-10.11.tar.gz, though built on Mac El Capitan, still works fine on Mac Monterey (Mac OS v 12.x). Grab it from that link and extract it. Then rename its darwin subfolder to imagemagick and move this subfolder into your GS3's gs2build/bin/darwin folder. Launching GLI now should find this imagemagick and use it to generate thumbnails and screenview images.

Note:

The gnome-lib environment may conflict with graphical applications on Linux systems. After compiling, open a fresh terminal to run GLI or other graphical applications. Make sure the new terminal has the environment set up for Java (version 8 from GS3.11 and onwards) and Ant too before running any Greenstone applications like the Greenstone Server (gs3-server) and GLI.

Uptodate source code from SVN

  1. Make sure you have SVN installed and on your Path
  2. Make sure you have set up Ant and Java in the environment too: set JAVA_HOME (to JDK 7+) and add its bin folder to the PATH. If you're on a 64 bit machine, you'll need a JDK for 64 bit machines, if you're on a 32 bit machine, you will need a JDK for 32 bit machines. Set ANT_HOME and add its bin folder to the PATH.
    export JAVA_HOME=/path/to/your/jdk7
    export ANT_HOME=/path/to/your/ant
    export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH


    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 Unix source installation page. Otherwise, proceed with the following.

  3. Checkout the code and go into the checked out folder:
    svn co https://svn.greenstone.org/main/trunk/greenstone3
    cd greenstone3
  4. Generate the file build.properties with:
    ant 


    Now, if necessary, you can customise the port/hostname fields in the newly generated toplevel file build.properties.

  5. Most Linux systems and probably all the newer Mac systems require gnome-lib for successful compilation. This will compile gnome-lib along with GS3.
    If you don't want to compile the gnome-lib extension when compiling GS3, but prefer to use a pre-compiled gnome-lib to speed up the process, in which case you'll carry out step 8 later, comment out the following line (by prefixing a # symbol to the line) in build.properties to de-activate it: checkout.gnomelib.ext=true
  6. If you want to compile imagemagick from source on Unix systems (though for Mac you can also use the precompiled imagemagick binary*), uncomment the following line in build.properties to activate it
    checkout.imagemagick.ext=true


    imagemagick is not successfully compiling at present on MacOS High Sierra (10.13.4) onward (nor 32 bit linux at the moment). So use the pre-compiled imagemagick binary* for Mac instead.

  7. Finally, you can start the steps for building GS3 from SVN:
    ant prepare
  8. This step is only applicable if you had decided on using a pre-compiled gnome-lib in step 5. In that case, visit https://trac.greenstone.org/browser/gs2-extensions/gnome-lib/trunk and there click on the link for the gnome-lib-minimal- zip/tarball for your operating system. On the next page, click on the download link to download the zip/tarball file, then move this downloaded file into gs2build/ext. After that, unpack and set up your gnome-lib-minimal for compiling as follows:
    cd gs2build/ext
    tar -xvzf gnome-lib-minimal-<your-OS-version>.tar.gz
    cd gnome-lib-minimal
    source ./devel.bash
    cd ../../..
  9. You can now run the compile step:
    ant install

* If you want imagemagick and ghostscript on a mac, check out the precompiled binaries from svn after the ant prepare step

cd gs2build
svn co https://svn.greenstone.org/main/trunk/binaries/mac/intel/ghostscript bin/darwin/ghostscript

svn export https://svn.greenstone.org/gs2-extensions/imagemagick/trunk/imagemagick-darwin-10.11.tar.gz
tar -xvzf imagemagick-darwin-10.11.tar.gz
mv imagemagick/darwin bin/darwin/imagemagick
rm -rf imagemagick-darwin-10.11.tar.gz
rm -rf imagemagick

For more detailed instructions on installation, please refer to the Linux GS3, Linux GS2 and Mac OS source installation pages.

Running the installer in text-only mode

  1. If you're on Linux or Mac, give the binary of the installer execute permissions
  2. Then run it by passing in the -textonly flag, as shown below.
  3. Follow the instructions on the screen thereafter. If you mistype at any stage, press ctrl-C to start again.
> ./Greenstone-3.06rc1-linux-x64 -textonly

NOTE: Previously, the instructions for running the installer in text-only mode were incorrect. They advised running the installer wrongly using ./Greenstone-3.06rc1-linux-x64 text-only, which rather triggered the default behaviour of the installer software (antinstaller) for a different kind of text-only installation rather than triggering the Greenstone installer's specific -textonly mode. Unfortunately, the wrong route would not install the bundled JRE into the Greenstone installation, despite requiring the Greenstone user to run the java command in the very next step of the install.

Installation for a networked lab environment

To support use of Greenstone 3 in a networked lab environment, it is possible to adjust the configuration settings of the installation to have one shared installation of the software, but allow individual users to build and serve collections from their own area of the file system. We refer to this as a "dispersed GS3" setup. More specifically, it is appropriate for a situation where your Greenstone 3 is to be distributed across 3 locations of your Windows machine: an installation location which is read-only regular users, and to which only the administrator has write permissions; a user-web location that is writable and specific to a user; and a temporary (typically local) file system area the user has read/write permissions to.

In the following text we describe the setup procedure for Windows, with Greenstone installed in C:/Program Files/. The same capability will work in networked situations for MacOS and Linux labs, choosing an appropriate directory such as /usr/local/Greenstone3 as the location to install the GS3 software to.

For one computer, here's how you can have Greenstone installed centrally (e.g. Program Files), but then have each different user when working at that computer have their own instance of the Greenstone 3 sites, collections, and customisations of the interface.

Install GS3 as an administrator using the binary installer. Then set the following 4 properties in build.properties:

  • set using.user.web=true
  • set web.home=${user.home}/greenstone3/web
    Java's user.home property should resolve to a writable user location, e.g web.home will work out to be something like C:/Users/me/greenstone3/web). You can decide on other locations within ${user.home}, as you choose. For example, you can set web.home=${user.home}/gs3/myweb.
    Or if your lab setup is such that you're mounting each user's account at H: at each log in, then just set web.home=H:/gs3/web. Then, whenever any user is logged in, their collection data will be in H:/gs3/web. So web.home in such a case may look static and fixed to somewhere in H: in the build.properties file, but it's actually not static, since it changes to refer to different users' accounts based on who is logged in.
  • set gsdl3home.isreadonly=true
  • set gsdl3.writablehome=${java.io.tmpdir}/greenstone/web

Set all the property values exactly as above, except web.home, which you should customise to point to a location that is writable by the GS3 user where the user can create collections. File path separators should be URL style slashes, so forward slash, /.

Now if you replicate the installation to other machines in the lab, your users can log into any machine and continue working with Greenstone3.

/var/www/dokuwiki/greenstone-wiki/private/data/pages/en/user_advanced/installation_312.txt · Last modified: 2025/07/16 00:00 by kjdon · Currently locked by: kjdon