en:user_advanced:installation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:user_advanced:installation [2025/07/09 06:38] – [Source Distribution] anupama | en:user_advanced:installation [2025/07/15 00:32] (current) – kjdon | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | 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: | ||
- | |||
- | |||
====== Advanced Installation ====== | ====== Advanced Installation ====== | ||
For most users, the main Greenstone download (also called the " | For most users, the main Greenstone download (also called the " | ||
Line 19: | Line 15: | ||
- | | + | |
- | * [[en:developer:compiling_greenstone3|Compiling Greenstone3]] | + | |
- | + | * [[en:user_advanced:installation_311| Greenstone 3.11 Installation Page]] | |
- | + | * [[en:user_advanced: | |
- | **Important Note:** Before proceeding, you're to set all instructed environment variables in the same terminal, unless explicitly stated otherwise. | + | |
+ | |||
===== Windows ===== | ===== Windows ===== | ||
- | |||
- | Prerequisites for compiling the source component and source distribution on Windows: | ||
- | * For compiling on Windows 64 bit, need the 64 bit version of JDK. For 3.11 and onwards, JDK 8 is needed. For compiling Greenstone 3.06 and onwards, need JDK 7.x or later. For old versions of Greenstone: Java JDK 6.x or later. | ||
- | C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat | ||
- | * PERL: if you're using GS3.07 or earlier, get ActivePerl for Windows. From GS3.08 onwards, binaries and source distributions come with a [[http:// | ||
- | * Visual Studio 8 or later (Visual Studio 12 on 64 bit Windows 10 worked too.) | ||
- | * (If you want to compile GS2 or GS3 with debugging on, you will need Microsoft SDK) | ||
- | * Additionally //for Greenstone3//: | ||
- | |||
- | 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 **'' | ||
- | <!-- TODO: add in line for Microsoft SDK --> | ||
- | |||
- | < | ||
- | @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 " | ||
- | |||
- | |||
- | set JAVA_HOME=C: | ||
- | if not exist " | ||
- | 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: | ||
- | |||
- | :: If you're compiling Greenstone 3, you'll also need ANT | ||
- | :: Note that GS3 binaries ship with Ant, located in '' | ||
- | :: For GS3 source distributions, | ||
- | :: the environment variable below and adjust the PATH. | ||
- | set ANT_HOME=C: | ||
- | |||
- | :: Add the bin folders of Perl and Java (and Ant for GS3) to your PATH | ||
- | set PATH=%PERLPATH%\bin; | ||
- | |||
- | :: If you want to compile GS2 with debugging on, you also need MS SDK and the following line: | ||
- | :: call " | ||
- | |||
- | :: Set up Visual studio environment. vcvars< | ||
- | :: Running VS in 64 bit mode doesn' | ||
- | :: (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 " | ||
- | |||
- | |||
- | :: 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 " | ||
- | |||
- | |||
- | |||
- | :: 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' | ||
- | :: Open a DOS prompt and cd/change directory into your Visual Studio folder. Then use the command: dir /b /s " | ||
- | :: and specify find the vcvars script by name, e.g. | ||
- | :: C:\Program Files (x86)\Microsoft Visual Studio> | ||
- | :: If such a file exists within your Visual Studio installation, | ||
- | :: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat | ||
- | :: Use this result in the " | ||
- | :: (and further, only for vcvarsall.bat, | ||
- | :: call " | ||
- | :done | ||
- | </ | ||
- | To make it easier for developers, a batch file containing placeholders you can adjust is already prepared and discussed at [[http:// | ||
==== Source Component ==== | ==== Source Component ==== | ||
- | <tabbox Greenstone3> | ||
- | **Note:** Greenstone 3 does not at present compile successfully if it was installed in a place containing spaces. The solution is to move the installed GS3 folder out into a different location, one without spaces in the filepath, //before// compiling. Once compiling is done, you can move your installed GS3 folder back to its original location. | ||
- | | + | |
- | - 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. | + | |
- | - Open a DOS prompt to run the following scripts and commands: | + | |
- | - Set up the environment for compiling Greenstone by running the setupenv.bat script described further above: '' | + | * [[en:user_advanced:installation_287# |
- | - Go into your Greenstone installation folder, '' | + | |
- | - The Java Runtime (JRE) included with Greenstone 3 binaries is a 32 bit Java 7 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 '' | + | |
- | * run '' | + | |
- | [exec] Could Not Find GS3\gs2build\common-src\src\gdbmedit\gdbmdel\gdbmdel.exe | + | |
- | | + | |
- | [exec] cd src\gdbmedit\gdbmdel | + | |
- | | + | |
- | 4\nmake.exe" | + | |
- | [exec] del *.obj | + | |
- | [exec] del gdbmdel.exe | + | |
- | | + | |
- | [exec] cd indexers | + | |
- | [exec] set DEBUG=0 | + | |
- | [exec] | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | >>>> | + | |
- | [exec] NMAKE : fatal error U1077: ' | + | |
- | | + | |
- | BUILD FAILED | ||
- | GS3\build.xml: | ||
- | * you may also want to want to delete '' | ||
- | - Finally, you can compile Greenstone 3. Still in your Greenstone installation folder, run '' | ||
- | |||
- | **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, | ||
- | |||
- | **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, | ||
- | |||
- | 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. | ||
- | <tabbox Greenstone2> | ||
- | - Get the source component zip file from the downloads page. | ||
- | - Unzip it in your Greenstone installation. 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. | ||
- | - Open a DOS prompt | ||
- | - Set up the environment for compiling Greenstone by running the setupenv.bat script described further above: '' | ||
- | - Go into your Greenstone installation: | ||
- | - Run the makegs2 script: '' | ||
- | - It will prompt you about whether to extract certain important files. Type Y to do so. | ||
- | - It will next present you with various compilation options. You want to type 4 (" | ||
- | - It will take some minutes to compile after which, if there are no errors, you can start running GLI or the gs2-server. | ||
- | - If you want to recompile GLI go into your Greenstone' | ||
- | |||
- | |||
- | **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 '' | ||
- | </ | ||
==== Source Distribution ==== | ==== Source Distribution ==== | ||
- | <tabbox Greenstone3> | ||
- | - Get the source distribution zip file from the downloads page. | ||
- | - //Unzip it in a location with no spaces in the filepath.// | ||
- | - Open a DOS prompt to run the following scripts and commands: | ||
- | - Set up the environment for compiling Greenstone by running the setupenv.bat script described above: '' | ||
- | - Go into your Greenstone 3 installation folder, '' | ||
- | - Edit your '' | ||
- | - Now you can finally compile Greenstone 3. Still in your Greenstone installation folder, run '' | ||
- | - It can take several minutes to compile up. | ||
- | - If you don't already have an imagemagick installed on your system and want to have // | ||
- | |||
- | **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 '' | ||
- | <tabbox Greenstone2> | ||
- | - Get the source distribution zip file from the downloads page. | ||
- | - Unzip it | ||
- | - Open a DOS prompt | ||
- | - Set up the environment for compiling Greenstone by running the setupenv.bat script described above: '' | ||
- | - Go into your Greenstone installation: | ||
- | - Run the makegs2 script: '' | ||
- | - It will prompt you about whether to extract certain important files. Type Y to do so. | ||
- | - It will next present you with various compilation options. You want to type 4 (" | ||
- | - It will take some minutes to compile after which, if there are no errors, you can start running the gs2-server. | ||
- | - If you want to run GLI as well, this will need to be compiled. To compile it, go into your Greenstone' | ||
- | - If you wish to compile up the GLI jar files, such as for Remote Greenstone situations, run the following from within the gli folder: '' | ||
- | - You will need to enable the Administration pages if you want access to them. Do so by editing your Greenstone installation' | ||
- | - If you don't already have an imagemagick installed on your system and want to have // | ||
- | </ | ||
==== Uptodate source code from SVN ==== | ==== Uptodate source code from SVN ==== | ||
- | Prerequisites for compiling on Windows: | + | * [[en:user_advanced: |
- | * Java JDK 6.x or later, JDK 7+ for GS3.06 onwards, and JDK 8 for GS3.11 onwards | + | * [[en:user_advanced:installation_311# |
- | * PERL (ActivePerl for Windows | + | * [[en:user_advanced:installation_310# |
- | * Visual Studio 8 or later | + | * [[en:user_advanced:installation_287# |
- | * (If you want to compile GS2 or GS3 with debugging on, you will need Microsoft SDK) | + | |
- | * Additionally: | + | |
- | + | ||
- | In addition to the Prerequisites for compiling Greenstone on Windows listed above, to install Greenstone from SVN source on Windows, you need to [[en:developer:install_svn|install svn]]. | + | |
- | + | ||
- | (**NOTE:** Some of the prerequisite packages are available from greenstone' | + | |
- | + | ||
- | 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 '' | + | |
- | + | ||
- | <tabbox Greenstone3> | + | |
- | Run the following: | + | |
- | < | + | |
- | svn co https:// | + | |
- | cd gs3-svn | + | |
- | ant | + | |
- | ant prepare | + | |
- | ant install | + | |
- | </ | + | |
- | <tabbox Greenstone2> | + | |
- | < | + | |
- | svn co https:// | + | |
- | cd gs2-svn | + | |
- | </ | + | |
- | Then on 64 bit Windows run: | + | |
- | < | + | |
- | makegs2x64.bat | + | |
- | </ | + | |
- | whereas on 32 bit Windows, you'd need to run: | + | |
- | < | + | |
- | makegs2.bat | + | |
- | </ | + | |
- | * Choose yes twice | + | |
- | * Choose step 4 to compile ALL without debugging | + | |
- | + | ||
- | Check out and compile GLI: | + | |
- | < | + | |
- | svn co https:// | + | |
- | cd gli | + | |
- | makegli.bat | + | |
- | makejar.bat | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | For more detailed instructions on source installation, | + | |
- | [[en:developer:windows_source_install|Windows]] source installation page. | + | |
===== Linux/Mac ===== | ===== Linux/Mac ===== | ||
- | In order to install Greenstone from source on Linux, you need to have the following installed: | ||
- | * [[en: | ||
- | * ANT | ||
- | * Java JDK. JDK 7 for Greenstone 3.06 and onwards. \\ **WARNING: | ||
- | * C/C++ compiler: XCode on Mac, gcc/g++ on Linux | ||
==== 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' | ||
- | - 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 '' | ||
- | export JAVA_HOME=/ | ||
- | export ANT_HOME=/ | ||
- | export PATH=$JAVA_HOME/ | ||
- | </ | ||
- | export CXXFLAGS=" | ||
- | export JNICFLAGS=" | ||
- | export CXXFLAGS=" | ||
- | - 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 '' | ||
- | * run '' | ||
- | * you may also want to want to delete '' | ||
- | - Most of the linux and mac machines we tested require the gnome-lib extension. Without it, if compilation fails with an error message about '' | ||
- | - Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:\\ < | ||
- | cd gs2build/ | ||
- | tar -xvzf gnome-lib-minimal-< | ||
- | cd gnome-lib-minimal | ||
- | source ./ | ||
- | cd ../../.. | ||
- | </ | ||
- | - In the same terminal, you can now finally run '' | ||
- | > env | grep INSTALL | ||
- | PERL_MM_OPT=INSTALL_BASE=/ | ||
- | > export INSTALL_BASE= | ||
- | > export PERL_MM_OPT= | ||
- | > ant install</ | ||
+ | * [[en: | ||
+ | * [[en: | ||
+ | * [[en: | ||
+ | * [[en: | ||
- | **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. | ||
- | |||
- | |||
- | <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' | ||
- | - Use a terminal to extract the downloaded file's contents into your Greenstone installation folder: \\ < | ||
- | tar -xvzf < | ||
- | </ | ||
- | - Move the '' | ||
- | - 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:// | ||
- | - 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: \\ < | ||
- | cd gli | ||
- | ./ | ||
- | ./ | ||
- | </ | ||
- | |||
- | |||
- | 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: | ||
- | < | ||
- | |||
- | * Run Install Shield again: | ||
- | < | ||
- | |||
- | * 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. | ||
- | < | ||
- | 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): | ||
- | < | ||
- | If you don't know what subversion/ | ||
- | |||
- | * 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): | ||
- | < | ||
- | > make all | ||
- | > make install | ||
- | </ | ||
- | All going well, this would have compiled it. If you had any difficulties during compilation, | ||
- | |||
- | * Still in $GSDLHOME, **set up the environment for Greenstone**: | ||
- | < | ||
- | |||
- | * 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**: | ||
- | < | ||
- | > ./ | ||
- | > ./ | ||
- | </ | ||
- | (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: | ||
- | < | ||
- | Unfortunately there' | ||
- | < | ||
- | / | ||
- | Version: 2.80 | ||
- | |||
- | Exception in thread " | ||
- | at javax.swing.plaf.synth.SynthContext.getPainter(SynthContext.java: | ||
- | .... | ||
- | </ | ||
- | You can correct the problem above, by | ||
- | * going to the directory $GSDLHOME/ | ||
- | * opening its file GathererProg.java in a text editor | ||
- | * and replacing the line | ||
- | < | ||
- | with: | ||
- | < | ||
- | * 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:// | ||
- | |||
- | |||
- | where the WebServerName and WebServerPort are what you specified when you [[en: | ||
- | </ | ||
==== Source Distribution ==== | ==== Source Distribution ==== | ||
+ | * [[en: | ||
+ | * [[en: | ||
+ | * [[en: | ||
+ | * [[en: | ||
- | 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 '' | ||
- | * Add svn/bin to PATH | ||
- | * Add JAVA_HOME/ | ||
- | * For GS3, also add ANT_HOME/ | ||
- | 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=/ | ||
- | export JAVA_HOME=/ | ||
- | export PATH=/ | ||
- | </ | ||
- | |||
- | <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' | ||
- | - Go into your extracted source distribution' | ||
- | - Make sure JAVA_HOME is set (to JDK 7 for Greenstone 3.06, JDK 8 from Greenstone 3.11 onwards) and that its '' | ||
- | - Most of the linux and mac machines we tested require the gnome-lib extension. Without it, if compiling fails with an error message about '' | ||
- | - Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:\\ < | ||
- | cd gs2build/ | ||
- | cd gnome-lib | ||
- | # gnome-lib can take longer to compile. | ||
- | # Alternatively, | ||
- | # as per instructions above, then run the following commands: | ||
- | #mv gnome-lib gnome-lib.orig | ||
- | #tar -xvzf gnome-lib-minimal-< | ||
- | #cd gnome-lib-minimal | ||
- | source ./ | ||
- | cd ../../.. | ||
- | </ | ||
- | - **If you're on a Mac OS version anywhere from 10.11/El Capitan until Mojava (and possibly Catalina)**, | ||
- | export CXXFLAGS=" | ||
- | export JNICFLAGS=" | ||
- | export CXXFLAGS=" | ||
- | - In the same terminal, you can now finally run '' | ||
- | > env | grep INSTALL | ||
- | PERL_MM_OPT=INSTALL_BASE=/ | ||
- | > export INSTALL_BASE= | ||
- | > export PERL_MM_OPT= | ||
- | > ant install</ | ||
- | - **For Mac OS, from El Capitan onwards:** If you don't already have an imagemagick installed on your system and want to have // | ||
- | |||
- | **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. | ||
- | |||
- | <tabbox Greenstone2> | ||
- | - Download the Source Distribution and extract it. For Linux/Mac, please use the tar.gz version as zip doesn' | ||
- | - 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:// | ||
- | - 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.\\ < | ||
- | ./ | ||
- | cd gli | ||
- | ./ | ||
- | ./ | ||
- | </ | ||
- | - You will need to enable the Administration pages if you want access to them. Do so by editing your Greenstone installation' | ||
- | |||
- | </ | ||
==== Uptodate source code from SVN ==== | ==== Uptodate source code from SVN ==== | ||
- | <tabbox Greenstone3> | + | |
- | + | * [[en:user_advanced:installation_311# | |
- | - Make sure you have SVN installed and on your Path | + | * [[en:user_advanced:installation_310# |
- | - Make sure you have set up Ant and Java in the environment too: set JAVA_HOME (to JDK 7+) and add its '' | + | |
- | export JAVA_HOME=/ | + | |
- | export ANT_HOME=/ | + | |
- | export PATH=$JAVA_HOME/ | + | |
- | </ | + | |
- | | + | |
- | svn co https:// | + | |
- | </ | + | |
- | - Generate the file '' | + | |
- | ant | + | |
- | </ | + | |
- | - Most Linux systems and probably all the newer Mac systems require // | + | |
- | - 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 '' | + | |
- | checkout.imagemagick.ext=true | + | |
- | </ | + | |
- | - Finally, you can start the steps for building GS3 from SVN: < | + | |
- | ant prepare</ | + | |
- | - This step is only applicable if you had decided on using a // | + | |
- | tar -xvzf gnome-lib-minimal-< | + | |
- | cd gnome-lib-minimal | + | |
- | source ./ | + | |
- | cd ../../.. | + | |
- | </ | + | |
- | - You can now run the compile step: < | + | |
- | cd ext | + | |
- | source devel.bash | + | |
- | cd / | + | |
- | </ | + | |
- | --> < | + | |
- | ant install | + | |
- | </ | + | |
- | + | ||
- | * If you want imagemagick and ghostscript on a mac, check out the precompiled binaries from svn **after** the '' | + | |
- | + | ||
- | < | + | |
- | cd gs2build | + | |
- | svn co https:// | + | |
- | + | ||
- | svn export https:// | + | |
- | tar -xvzf imagemagick-darwin-10.11.tar.gz | + | |
- | mv imagemagick/ | + | |
- | rm -rf imagemagick-darwin-10.11.tar.gz | + | |
- | rm -rf imagemagick | + | |
- | + | ||
- | </ | + | |
- | + | ||
- | <tabbox Greenstone2> | + | |
- | - First grab all the source code from SVN by running the following commands in your terminal \\ < | + | |
- | svn co https:// | + | |
- | cd greenstone2 | + | |
- | svn co https:// | + | |
- | </ | + | |
- | - 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:// | + | |
- | - Compile up Greenstone: \\ < | + | |
- | ./ | + | |
- | cd gli | + | |
- | ./ | + | |
- | ./ | + | |
- | </ | + | |
- | - You will need to enable the Administration pages if you want access to them. Do so by editing your Greenstone installation' | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | + | ||
- | For more detailed instructions on installation, | + | |
- | and [[en:developer:mac_source_install|Mac OS]] source installation pages. | + | |
==== Running the installer in text-only mode ==== | ==== Running the installer in text-only mode ==== | ||
- | - If you're on Linux or Mac, give the binary of the installer execute permissions | ||
- | - Then run it by passing in the -textonly flag, as shown below. | ||
- | - Follow the instructions on the screen thereafter. If you mistype at any stage, press ctrl-C to start again. | ||
- | |||
- | < | ||
- | > ./ | ||
- | </ | ||
- | |||
- | **NOTE:** Previously, the instructions for running the installer in text-only mode were incorrect. They advised running the installer wrongly using '' | ||
- | |||
- | ===== Installation for a networked lab environment ===== | ||
- | |||
- | To support use of Greenstone 3 in a networked lab environment, | ||
- | users to build and serve collections from their own area of the file system. | ||
- | More specifically, | ||
- | |||
- | In the following text we describe the setup procedure for Windows, with | ||
- | Greenstone installed in C:/Program Files/ | ||
- | for MacOS and Linux labs, choosing an appropriate directory such as / | ||
- | 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, | ||
- | |||
- | Install GS3 as an administrator using the binary installer. Then set the following 4 properties in build.properties: | ||
- | |||
- | * set '' | ||
- | * set '' | ||
- | * set '' | ||
- | * set '' | ||
- | |||
- | Set all the property values exactly as above, except '' | ||
- | |||
- | Now if you replicate the installation to other machines in the lab, your users can log into any machine and continue working with Greenstone3. | ||
- | |||
- | <!-- | ||
- | greenstone-307.cmd file contains: | ||
- | |||
- | @goto %1 | ||
- | |||
- | :start | ||
- | |||
- | robocopy /e /purge /np image " | ||
- | |||
- | if %ERRORLEVEL% GEQ 4 fail | ||
- | |||
- | robocopy /e /xx /np patches " | ||
- | |||
- | if %ERRORLEVEL% GEQ 4 fail | ||
- | |||
- | robocopy /e /purge /np startmenu " | ||
- | |||
- | if %ERRORLEVEL% GEQ 4 fail | ||
- | |||
- | done | ||
- | |||
- | --> | ||
- | |||
- | ===== 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 ' | ||
- | |||
- | To make your working copy stable, change to the root directory of the working copy and run one of these commands: | ||
- | < | ||
- | (For Greenstone2): | ||
- | (For Greenstone3): | ||
- | </ | ||
- | Or to checkout a fresh stable working copy, run one of these commands: | ||
- | < | ||
- | (For Greenstone2): | ||
- | (For Greenstone3): | ||
- | </ | ||
- | |||
- | Then test your changes and/or keep working on them. Once you are ready to commit your changes, switch back to the trunk: | ||
- | < | ||
- | (For Greenstone2): | ||
- | (For Greenstone3): | ||
- | </ | ||
- | 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 ' | ||
- | You can execute a command like the following to switch to the stable tag for one of | ||
- | these projects: | ||
- | |||
- | '' | ||
- | And switch back with: | + | * [[en:user_advanced: |
+ | * [[en: | ||
+ | * [[en: | ||
+ | * [[en: | ||
- | '' | ||
- | **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 ' | ||
Line 617: | Line 86: | ||
- | ===== 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, " | ||
- | Once you've moved your Greenstone installation, | ||
- | - Open your Greenstone 2 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, | ||
- | - 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.1752043125.txt.gz · Last modified: 2025/07/09 06:38 by anupama