User Tools

Site Tools


en:user_advanced:installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:user_advanced:installation [2023/07/29 09:15] – [Source Distribution] anupamaen:user_advanced:installation [2023/08/03 03:07] (current) – [Source Distribution] anupama
Line 182: Line 182:
   - 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.)   - 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.)
   - Go into your Greenstone 3 installation folder, ''cd C:\path\to\Greenstone3\'', and run ''gs3-setup.bat''.   - Go into your Greenstone 3 installation folder, ''cd C:\path\to\Greenstone3\'', and run ''gs3-setup.bat''.
-  - 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<code>if %VISUAL_STUDIO_MAJORVERSION% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip</code>So it looks like:<code>::if %VISUAL_STUDIO_MAJORVERSION% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip</code>+  - 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<code>if %VISUAL_STUDIO_MAJORVERSION% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip</code>So it looks as follows, then save the script file:<code>::if %VISUAL_STUDIO_MAJORVERSION% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip</code>
   - Now you can finally compile Greenstone 3. Still in your Greenstone installation folder, run ''ant install''.   - Now you can finally compile Greenstone 3. Still in your Greenstone installation folder, run ''ant install''.
   - It can take several minutes to compile up.   - It can take several minutes to compile up.
-  - If you don't already have an imagemagick installed 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.)+  - 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.)
  
  
Line 204: Line 204:
   - If you wish to compile up the GLI jar files, such as for Remote Greenstone situations, run the following from within the gli folder: ''makejar.bat''.   - If you wish to compile up the GLI jar files, such as for Remote Greenstone situations, run the following from within the gli folder: ''makejar.bat''.
   - You will need to enable the Administration pages if you want access to them. Do so by editing your Greenstone installation's ''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).   - You will need to enable the Administration pages if you want access to them. Do so by editing your Greenstone installation's ''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).
-  - If you don't already have an imagemagick installed 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 GS2 source distribution folder's ''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.)+  - 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 GS2 source distribution folder's ''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.)
 </tabbox> </tabbox>
  
Line 272: Line 272:
 <tabbox Greenstone3> <tabbox Greenstone3>
   - 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.   - 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.
-  - Set up ant and Java: set JAVA_HOME (to JDK 7 for Greenstone 3.06) 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.\\ <code>+  - 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.\\ <code>
 export JAVA_HOME=/path/to/your/jdk7 export JAVA_HOME=/path/to/your/jdk7
 export ANT_HOME=/path/to/GS3/packages/ant export ANT_HOME=/path/to/GS3/packages/ant
 export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
-</code>If you're on Mac OS version 10.11/El Capitan, set CFLAGS, CXXFLAGS and JNIFLAGS as follows: \\ <code>export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"+</code>**If you're on Mac OS version anywhere from 10.11/El Capitan until Mojava (and possibly Catalina)**, set CFLAGS, CXXFLAGS and JNIFLAGS as follows: \\ <code>export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"
 export CXXFLAGS="$CXXFLAGS $CFLAGS" export CXXFLAGS="$CXXFLAGS $CFLAGS"
-export JNICFLAGS="$JNICFLAGS $CFLAGS"</code> Since GS3.08, if you're on 64 bit linux, you will also need to add -fPIC to the CFLAGS and CXXFLAGS environment variables: \\ <code>export CFLAGS="-fPIC $CFLAGS"+export JNICFLAGS="$JNICFLAGS $CFLAGS"</code> **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: \\ <code>export CFLAGS="-fPIC $CFLAGS"
 export CXXFLAGS="-fPIC $CXXFLAGS"</code>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. export CXXFLAGS="-fPIC $CXXFLAGS"</code>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.
-  - The Java Runtime (JRE) included in binaries from Greenstone 3.07 onward is version 7. 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 \\+  - 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.      * 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.      * run ''ant distclean'' from the toplevel Greenstone installation folder, to clear all the older compile products that were compiled with Java 7.
Line 400: Line 400:
 <tabbox Greenstone3> <tabbox Greenstone3>
   - 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.   - 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.
-  - Make sure JAVA_HOME is set (to JDK 7 for Greenstone 3.06) 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.+  - 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.
   - 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.   - 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.
   - Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:\\ <code>   - Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:\\ <code>
 cd gs2build/ext cd gs2build/ext
-tar -xvzf gnome-lib-minimal-<your-OS-version>.tar.gz +cd gnome-lib  
-cd gnome-lib-minimal+# 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 source ./devel.bash
 cd ../../.. cd ../../..
 </code> </code>
-  - If you're on Mac OS version 10.11/El Capitan, set CFLAGS, CXXFLAGS and JNIFLAGS as follows: \\ <code>export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"+  - **If you're on Mac OS version anywhere from 10.11/El Capitan until Mojava (and possibly Catalina)**, set CFLAGS, CXXFLAGS and JNIFLAGS as follows: \\ <code>export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"
 export CXXFLAGS="$CXXFLAGS $CFLAGS" export CXXFLAGS="$CXXFLAGS $CFLAGS"
-export JNICFLAGS="$JNICFLAGS $CFLAGS"</code> Since GS3.08, if you're on 64 bit linux, you will also need to add -fPIC to the CFLAGS and CXXFLAGS environment variables: \\ <code>export CFLAGS="-fPIC $CFLAGS"+export JNICFLAGS="$JNICFLAGS $CFLAGS"</code> **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: \\ <code>export CFLAGS="-fPIC $CFLAGS"
 export CXXFLAGS="-fPIC $CXXFLAGS"</code> export CXXFLAGS="-fPIC $CXXFLAGS"</code>
   - 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 [[http://gentoo.2317880.n4.nabble.com/PREFIX-revolutions-in-the-bootstrapping-world-td181438.html|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'':\\ <code>   - 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 [[http://gentoo.2317880.n4.nabble.com/PREFIX-revolutions-in-the-bootstrapping-world-td181438.html|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'':\\ <code>
Line 419: Line 424:
 > export PERL_MM_OPT= > export PERL_MM_OPT=
 > ant install</code> > ant install</code>
 +  - **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:** **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 and Ant too before running any Greenstone applications like the Greenstone Server (gs3-server) and GLI.+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.
  
 <tabbox Greenstone2> <tabbox Greenstone2>
en/user_advanced/installation.1690622143.txt.gz · Last modified: 2023/07/29 09:15 by anupama