User Tools

Site Tools


en:user_advanced:installation_311

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_311 [2025/07/14 21:23] – [Uptodate source code from SVN] kjdonen:user_advanced:installation_311 [2025/07/15 00:08] (current) kjdon
Line 1: Line 1:
  
 +====== Advanced Installation: 3.11 ======
  
 +//Updated on 30 Sep 2021, with changes that do not apply for Greenstone 3.10 and earlier.//
  
-====== Advanced Installation: 3.11 ======+[[en:user_advanced:installation|Advanced Installation Index Page]] - from here you can access different versions of this page.
  
-//Updated on 30 Sep 2021, with changes that do not apply for Greenstone 3.10 and earlier. 
-For instructions related to compiling GS3.10 from source distribution or with source component, or with source code from before September 2021, refer to the now [[old:user_advanced:installation|older version of this Advanced Installation page]].// 
  
 For most users, the main Greenstone download (also called the "binary") with default settings is sufficient, and is very [[en:beginner:install_basic|easy to install]]. However, there are some instances where you may want or need to go through a more advanced installation process: For most users, the main Greenstone download (also called the "binary") with default settings is sufficient, and is very [[en:beginner:install_basic|easy to install]]. However, there are some instances where you may want or need to go through a more advanced installation process:
Line 222: Line 222:
  
 ==== Source Component ==== ==== Source Component ====
-<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, 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>   - 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>
Line 256: Line 256:
 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. 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.
  
- 
-<tabbox Greenstone2> 
-  - Download the Source Component tar.gz file that matches with your Greenstone binary version, and put it in your Greenstone installation folder. For Linux/Mac, you want the tar.gz version because the zip version doesn't preserve necessary file permissions. 
-  - Use a terminal to extract the downloaded file's contents into your Greenstone installation folder: \\ <code>cd <your greenstone folder> 
-tar -xvzf <source-componentfile> 
-</code> 
-  - Move the ''ext/gnome-lib-minimal'' out of the way or rename it to something else. 
-  - If you want to compile up gnome-lib yourself, skip this step. If you want to use a pre-compiled gnome-lib binary (to save on all the time of compiling gnome-lib), download the gnome-lib-minimal package for your OS by visiting http://trac.greenstone.org/browser/gs2-extensions/gnome-lib/trunk \\ Then unzip the downloaded gnome-lib minimal package into your ''greenstone2-home/ext'' folder. 
-  - Make sure JAVA_HOME is set and the bin folders for Java and Perl are on your PATH. 
-  - Run the following, which will get gnome-lib and compile it up as it's compiling your Greenstone: \\ <code> ./makegs2.sh gnome-lib 
-cd gli 
-./makegli.sh 
-./makejar.sh 
-</code> \\ **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: 
- 
-  * Go to **the folder where you unpacked the Greenstone binary distribution**. For example, if this folder were called gsdl-2.80-unix: 
-<code>> cd gsdl-2.80-unix</code> 
- 
-  * Run Install Shield again: 
-<code>> ./setupLinux.bin</code> 
- 
-  * You already have Greenstone installed, therefore when it asks you whether you want to install it as a web server choose **Custom Setup**. 
- 
-  * Untick everything. Tick only the **Source Code** option. If it asks you whether you want to overwrite files you already have, press the **No to All** button. 
- 
-  * Go into $GSDLHOME -- the folder where you installed Greenstone.  
-<code>> cd $GSDLHOME</code> 
-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): 
-<code>> svn co http://svn.greenstone.org/indexers/trunk indexers</code> 
-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 [[en:user_advanced:installation|source install]] page. 
- 
-  * Now that you are in $GSDLHOME and have the indexers folder in it, you can **compile it all** by typing the following in an xterm (note that each step can take a few minutes): 
-<code>> ./configure 
-> make all 
-> make install 
-</code> 
-All going well, this would have compiled it. If you had any difficulties during compilation, see the [[en:user_advanced:installation|source install]] page. 
- 
-  * Still in $GSDLHOME, **set up the environment for Greenstone**: 
-<code>> source setup.bash</code> 
- 
-  * To get the Greenstone Librarian Interface (GLI) working, you need to compile that. So go into the gli folder, which is located in $GSDLHOME, and **compile GLI**: 
-<code>> cd gli 
-> ./makegli.sh 
-> ./makejar.sh 
-</code> 
-(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: 
-<code>> ./gli.sh</code> 
-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: 
-<code>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) 
-        .... 
-</code> 
-You can correct the problem above, by  
-  * going to the directory $GSDLHOME/gli/src/org/greenstone/gatherer 
-  * opening its file GathererProg.java in a text editor 
-  * and replacing the line  
-<code>UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());</code> 
-with: 
-<code>UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");</code> 
-  * Save the file you just edited.  
-  * Finally, you need to recompile GLI again as explained just above. 
- 
-  * Assuming your web server is set up and running, you can **view the pages Greenstone serves from the browser** at http://WebServerName:WebServerPort/gsdl/cgi-bin/library  
  
  
-where the WebServerName and WebServerPort are what you specified when you [[en:user_advanced:gs2_server| set up your web server]].  
-</tabbox> 
 ==== Source Distribution ==== ==== Source Distribution ====
  
Line 350: Line 274:
 </code> </code>
  
-<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.
   - 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.\\ \\    - 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.\\ \\ 
Line 383: Line 307:
 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. 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> 
-  - Download the Source Distribution and extract it. For Linux/Mac, please use the tar.gz version as zip doesn't preserve necessary file permissions. 
-  - If you want to compile up gnome-lib yourself, skip this step. If you want to use a pre-compiled gnome-lib binary (to save on all the time of compiling gnome-lib), download the gnome-lib-minimal package for your OS by visiting http://trac.greenstone.org/browser/gs2-extensions/gnome-lib/trunk \\ Then unzip the downloaded gnome-lib minimal package into your greenstone2-home/ext  
-  - Make sure JAVA_HOME is set and the bin folders for Java and Perl are on your PATH. 
-  - Run the following, which will get gnome-lib and compile it up as it's compiling your Greenstone.\\ <code> 
-./makegs2.sh gnome-lib imagemagick 
-cd gli 
-./makegli.sh 
-./makejar.sh 
-</code> \\ **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. 
-  - 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). 
  
-</tabbox> 
 ==== Uptodate source code from SVN ==== ==== Uptodate source code from SVN ====
  
-<tabbox Greenstone3>+
  
   - Make sure you have SVN installed and on your Path   - Make sure you have SVN installed and on your Path
Line 448: Line 360:
 </code> </code>
  
-<tabbox Greenstone2> 
-  - First grab all the source code from SVN by running the following commands in your terminal \\ <code> 
-svn co https://svn.greenstone.org/main/trunk/greenstone2 greenstone2 
-cd greenstone2 
-svn co https://svn.greenstone.org/main/trunk/gli 
-</code> 
-  - If you want to compile up gnome-lib yourself, skip this step. If you want to use a pre-compiled gnome-lib binary, download the gnome-lib-minimal package for your OS by visiting https://trac.greenstone.org/browser/gs2-extensions/gnome-lib/trunk \\ Then unzip the downloaded gnome-lib minimal package into your greenstone2-home/ext  
-  - Compile up Greenstone: \\ <code> 
-./makegs2.sh gnome-lib 
-cd gli 
-./makegli.sh 
-./makejar.sh 
-</code> 
-  - 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). 
-</tabbox> 
  
  
Line 527: Line 424:
 --> -->
  
-===== Source Code Stability ===== 
-Note: This page is aimed at Greenstone developers. 
- 
-The source code stability system attempts to provide developers with a constant stable code base for development even as the main trunk passes between stable and unstable states. If you are doing development on a working copy of the trunk, but the trunk has bugs which prevent it compiling or running, then it can be very hard to test your changes. Rather than spend time inquiring into those bugs, the stability system gives you a way to temporarily roll your working copy back to the last stable state. Once you have finished testing your changes, you can then roll you working copy forward again and commit your changes. Except in the case where other developers have made significant changes to the trunk, your changes will start working once the trunk is stable again. 
- 
-The stability system works by periodically checking out the trunk and testing it for stability, then creating a 'stable' tag if and only if the trunk passes these stability tests. For now the stability tests are as simple as checking that the release kits on all three main operating systems were able to successfully create a release from the trunk. In the future, these checks could be extended to include regression tests, installer tests, tests to the runtime system and anything else which might further 'prove' the stability of the trunk. Stable tags related to Greenstone2 are named 'stable' and stable tags related to Greenstone3 are named 'stable3'. 
- 
-To make your working copy stable, change to the root directory of the working copy and run one of these commands: 
-<code> 
- (For Greenstone2): svn switch http://svn.greenstone.org/gsdl/stable 
- (For Greenstone3): svn switch http://svn.greenstone.org/greenstone3/stable3 
-</code> 
-Or to checkout a fresh stable working copy, run one of these commands: 
-<code> 
- (For Greenstone2): svn checkout http://svn.greenstone.org/gsdl/stable gsdl 
- (For Greenstone3): svn checkout http://svn.greenstone.org/greenstone3/stable3 greenstone3 
-</code> 
- 
-Then test your changes and/or keep working on them. Once you are ready to commit your changes, switch back to the trunk: 
-<code> 
- (For Greenstone2): svn switch http://svn.greenstone.org/gsdl/trunk 
- (For Greenstone3): svn switch http://svn.greenstone.org/greenstone3/trunk 
-</code> 
-And commit as normal. 
- 
-**Note**: The stable tags are read-only. (Only the nightly tasks that create the stable tags can write to them.) This is for good reason; allowing commits to the stable tag would be lost the next time the trunk was tagged as stable. 
- 
-The projects 'gli', 'gs2build', 'indexers' and 'documentation' also have stable tags.  
-You can execute a command like the following to switch to the stable tag for one of  
-these projects: 
- 
-''svn switch <nowiki>http://</nowiki>svn.greenstone.org/**//project-name//**/stable[3]'' 
- 
-And switch back with: 
- 
-''svn switch <nowiki>http://</nowiki>svn.greenstone.org/**//project-name//**/trunk'' 
- 
-**Note**: Though the stable branches are in separate locations in the repository, they should be considered as one unit. To get a //bona fide// stable working copy, each project which made up the working copy would have to be switched to the stable tag of the project. Mixing of 'stable' and 'stable3' tags would also prevent a working copy from being a //bona fide// working copy. 
- 
- 
- 
- 
- 
-===== Moving a Greenstone installation ===== 
-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: 
-  - Open your Greenstone 2 installation's cgi-bin\gsdlsite.cfg file and change the value for the GSDLHOME property to reflect the new path to your Greenstone installation. 
-  - To get the local library server (server.exe) to work from the new location: if your top-level Greenstone installation folder contains the files llssite.cfg and glisite.cfg, delete these. (Note that you should not delete the template files llssite.cfg.in and glisite.cfg.in!) If running the local library server has any issues with Internet Explorer, go to the local library's File>Settings menu and change the Other Browser setting to use Firefox. 
-  - To get the Apache web server included with Greenstone to work: delete the file lib\java\log4j.properties. (Doing so will ensure that if you execute the gs2-server.bat file--which launches the Greenstone Server Interface--this properties file will be regenerated with the correct value for gsdlhome.) 
  
en/user_advanced/installation_311.1752528186.txt.gz · Last modified: 2025/07/14 21:23 by kjdon