- Timestamp:
- 2021-05-01T18:25:18+12:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-sites-dev/eurovision-lod/INSTALL.txt
r35129 r35130 1 Greenstone 3 (GSDL3) 2 Copyright (C) 2003 New Zealand Digital Libraries, University Of Waikato 3 Greenstone3 comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt 4 This is free software, and you are welcome to redistribute it 1 Eurovision -- Let it Sparkle/Sparql 2 =================================== 5 3 6 Installing Greenstone 7 --------------------------------------------------------- 4 1. Requirements 8 5 9 Download the appropriate installer from sourceforge.net/projects/greenstone3 and run it. 6 Core command-line tools used by Greenstone3 are: 10 7 11 See 'Installing from a Source Distribution' section below for extra notes about installing from Source. 8 svn 9 make, autoconf, gcc, g++ 10 ant, javac 11 libz, imagemagick, wget 12 12 13 See the README-SVN.txt file for extra notes about installing directly from SVN. 13 These can be installed on a Debian10 distribution, for example, 14 with: 14 15 15 Greenstone 3 requires Java and Ant to run. These will be installed during a 16 Greenstone binary installation. 16 sudo apt update 17 sudo apt install subversion build-essential openjdk-11-jdk ant libz-dev, imagemagick wget 17 18 18 Running Greenstone: 19 --------------------------------------------------------- 19 For editing config files, our preference is to use emacs: 20 20 21 To start up Greenstone, select Greenstone3 Digital Library from the Start menu 22 (Windows), or run gs3-server.sh/bat. This launches a small server program 23 which starts up Tomcat and launches a browser. A small window pops up which 24 allows you to change some settings for your library and restart the Tomcat 25 server. Closing this program will stop Tomcat running. 26 27 Alternatively, you can start Tomcat directly through using Ant. 'ant start', 28 'ant restart' and 'ant stop' starts, restarts and shuts down Tomcat, 29 respectively. This will only start/stop a local server (one installed by 30 Greenstone). You will need to manually start/stop an external Tomcat 31 (see below for notes about using a version of Tomcat external to Greenstone). 32 33 You will need to run 'gs3-setup' (Windows) or 'source gs3-setup.sh' (Linux/Mac) 34 before running ant targets. 35 36 Once the Tomcat server is running, Greenstone will be available in a browser 37 at "http://localhost:8080/greenstone3" (or whatever port you specified 38 during the installation process). 39 You can change the port number using File->Settings in the server program, or 40 by changing the 'tomcat.port' property in build.properties, then running 41 'ant configure'. 42 43 Building Collections: 44 ---------------------------------------------------------- 45 46 You need to have Perl installed and on your PATH. Perl is included as part of 47 the Windows binary distribution. 48 49 You can build collections using the Greenstone Librarian Interface (GLI). 50 To start GLI, select it from the Start Menu (Windows), run 'ant gli' from the 51 greenstone3 directory, or cd to greenstone3/gli and run gli.sh/bat. 52 53 Once you have created and built a collection, you can see it by clicking 'Preview collection' on the Build panel. 54 55 Java/Tomcat Notes 56 -------------------------------------------------------- 57 58 Binary releases of Greenstone are compiled with Java 1.5 and come with JRE 1.5 and Tomcat 6. Tomcat 6 does not work with Java 1.4. 59 60 To recompile the source from a binary release: 61 * Download the source code component and unpack into Greenstone3 directory. 62 * You will need to install a JDK, 1.5 or later. 63 * Rename the packages/jre folder to something else (eg jre.old) 64 * Set JAVA_HOME environment to be the root of your Java installation. 65 * run 'ant install' 66 67 If you wish to use Java 1.4: 68 * Do all the above steps but before running ant install, 69 * delete packages/tomcat/.flagfile and run 'ant prepare-tomcat' to get Tomcat 5. 70 71 Greenstone 3 from SVN will download Tomcat 5 if you are using Java 1.4, otherwise will download Tomcat 6. 72 73 Greenstone Admin 74 ------------------------------------------------------ 75 76 The Greenstone admin tool is currently under development. 77 78 Using SOAP: 79 ------------------------------------------------------- 80 81 Greenstone comes with Apache Axis installed as part of the Greenstone web 82 application. However, no SOAP services are deployed by default. 83 84 To deploy a SOAP server for localsite, run 'ant deploy-localsite'. You should 85 now be able to see all localsite's collections through the gateway servlet. 86 (http://localhost:8080/greenstone3/gateway) 87 88 To set up a SOAP server on a new site, run 89 ant soap-deploy-site 90 This will prompt you for the sitename (the directory name), and the site uri 91 - this should be a unique identifier for the site's web service. 92 93 For a non-interactive version, run 94 ant -Daxis.sitename=xxx -Daxis.siteuri=yyy soap-deploy-site 95 96 The service is accessible at 97 http://localhost:8080/greenstone3/services/<siteuri> 98 99 (or http://<computer-web-address>:<port>/greenstone3/services/<siteuri>) 100 101 Note: Deploying a SOAP service for any site other than localsite requires 102 the Greenstone source code to be installed. This is not installed by default 103 for a binary distribution. To get the source code, re-run the installer, 104 select custom install and deselect everything except the source code. 105 106 Using External Tomcat: 107 --------------------------------------------------- 108 109 If you want to use an existing Tomcat, set the path to its base directory 110 in build.properties (tomcat.installed.path). Also set the tomcat.port 111 property to be the port you are running Tomcat on, and change tomcat.server 112 if the web address is not localhost. Then run 'ant configure'. 113 114 You will need to modify the Tomcat setup slightly. 115 116 1. Tell Tomcat about the Greenstone web app. There are two ways to do this. 117 118 A. Copy the file greenstone3/resources/tomcat/greenstone3.xml into Tomcat's 119 conf/Catalina/localhost directory. You'll need to edit the file and 120 replace @gsdl3webhome@ with the full path to the web directory of your 121 greenstone 3 installation. Any path separator is fine here ('/', '\\', '\'). 122 123 B. Alternatively, you can move (and rename) the greenstone3/web directory to 124 tomcat/webapps/greenstone3 (i.e. the resulting directories will be like 125 tomcat/webapps/greenstone3/WEB-INF, no web directory). This should be done 126 after running the initial 'ant install'. 127 128 You will need to set the web.home property in the build.properties file 129 i.e. 130 web.home=${tomcat.installed.path}/webapps/greenstone3 131 And then run 'ant configure' to reset gsdl3home. 132 133 2. Set up the JNI libraries and Java wrappers. 134 JNI libraries and their Java wrappers cannot go into the web app. The 135 libraries need to be loaded by the same class loader as their wrappers. The 136 libraries need to be in java.library.path, and I think get loaded by the 137 system class loader. 138 The wrappers need to be loaded by this too. 139 140 These JNI bits are located by default in the lib/jni directory. There are 141 two ways to get them into Tomcat: 142 A: Keep all the Greenstone stuff inside the greenstone3 directory, and just 143 modify the environment that Tomcat runs in 144 145 Set LD_LIBRARY_PATH (GNU/Linux), DYLD_LIBRARY_PATH (Mac OS X) or PATH/Path 146 (windows) to include the greenstone3/lib/jni directory. 147 Add all the jar files in greenstone3/lib/jni directory to the CLASSPATH, 148 then edit tomcats setclasspath.sh/bat to use the system CLASSPATH. 149 (in setclasspath.bat, change 150 set CLASSPATH=%JAVA_HOME%\lib\tools.jar 151 to 152 set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH% 153 154 in setclasspath.sh, change 155 # Set standard CLASSPATH 156 if [ "$1" = "debug" -o "$1" = "javac" ] ; then 157 CLASSPATH="$JAVA_HOME"/lib/tools.jar 158 fi 159 160 to 161 # Set standard CLASSPATH 162 if [ "$1" = "debug" -o "$1" = "javac" ] ; then 163 CLASSPATH="$JAVA_HOME"/lib/tools.jar:"$CLASSPATH" 164 fi 21 sudo apt install emacs 165 22 166 23 167 B: Copy the files into Tomcat installation: 168 Move the greenstone3/lib/jni jar files into tomcat's shared/lib directory. 169 Move the greenstone3/lib/jni library files (.so for GNU/Linux, .jnilib for 170 Mac OS X .dll for Windows) into shared/classes, and set LD_LIBARARY_PATH 171 (GNU/Linux), DYLD_LIBRARY_PATH (Mac OS X) or PATH/Path (Windows) to include 172 this directory. 173 This has the advantage that you can use this for other webapps without 174 modifying the Tomcat environment. 24 2. Environemts Variable Settings 175 25 176 Once all these changes have been made, you will need to restart the Tomcat 177 server for them to take effect. 26 For the above Debian10 setup, set the following environment variables: 27 28 export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 29 export PATH=$JAVA_HOME/bin:$PATH 30 31 export CFLAGS=-fPIC 32 export JAVACFLAGS="-source 1.6 -target 1.6" 33 34 Adjust for your specific environemnt as necessary 178 35 179 36 180 Notes for Mac OS 181 ------------------------------------------------ 37 3. Checkout and Prepare core Greenstone3 system 182 38 183 Set JAVA_HOME to be /Library/Java/Home 39 svn co https://svn.greenstone.org/main/trunk/greenstone3 greenstone3-svn 40 cd greenstone3-svn 184 41 185 Notes for Windows 186 ----------------------------------------------- 42 To generate a default 'build.properties' 187 43 188 You can set environment variables by going to 189 Control Panel->System->Advanced->Environment Variables. 44 ant 190 45 191 Installing from a Source Distribution 192 ---------------------------------------------- 46 To check out GS2 building code: 193 47 194 Download the greenstone-3.xx-src.tar.gz package from 195 sourceforge.net/projects/greenstone3, and unpack it. 196 197 In the greenstone3 directory, edit the build.properties file and run 198 ant install 199 200 Tomcat will be installed as part of the prepare process. To stop this set the 201 tomcat.installed.path to be the root of an existing Tomcat installation. 202 203 * Solaris notes: 204 ** Make sure /usr/local/bin is in your PATH ahead of /usr/bin etc. 205 ** Add /usr/local/lib to LD_LIBARY_PATH 206 ** The gdbm database files (gs2mgdemo and gs2mgppdemo collections) were generated on a Mac, and don't seem to be compatible with Solaris. A text version of the file (database.txt) is included in the index/text directory. After installing Greenstone, and before running it, you'll need to: 207 in greenstone3/gs2build directory: run 'source setup.bash' (Or if you have greenstone 2 already installed, run 'source setup.bash' in your greenstone 2 installation) 208 in greenstone3/web/sites/localsite/collect/gs2mgdemo/index/text directories, run 'txt2db gs2mgdemo.bdb < database.txt' 209 in greenstone3/web/sites/localsite/collect/gs2mgppdemo/index/text directories, run 'txt2db gs2mgppdemo.bdb < database.txt' 210 ** GLI shell scripts may not work like "./gli4gs3.sh". In this case, run "bash ./gli4gs3.sh" etc. You will need to compile GLI by hand (run "bash ./makegli.sh" in greenstone3/gli directory). 211 ** Set CC=gcc environment variable if you don't have cc, before running ant install. 212 213 * Windows notes: 214 ** You need to have Visual Studio installed to compile the C/C++ code. Set the path to the setup file in build.properties (compile.windows.c++.setup). 215 216 Configuring your installation: 217 -------------------------------------------------------- 218 219 The file build.properties contains various parameters that can be set by the user. Please check these settings before running the install. 220 Note, either forward slash '/' or double backslash '\\' can be used as path separators in the build.properties file, but not single backslash '\'. 221 222 Greenstone 3 comes with Tomcat bundled in. 223 224 If you already have Tomcat running, you can set the 'tomcat.installed.path' property (in build.properties) to the base directory of your Tomcat installation, and Greenstone will not use its own Tomcat. (You can delete the packages/tomcat directory if you like.) Please read the section "Using External Tomcat" for details about how to configure Tomcat for Greenstone. 225 226 Mac OS X: You need to have GDBM installed (http://www.gnu.org/software/gdbm/gdbm.html). Please set the gdbm.installed.path property (in build.properties) to the root of your gdbm installation if it is not installed in a default place. If you run GLI or GS2 collection building from the command line, you will need to set the DYLD_LIBRARY_PATH environment variable to include <path-to-gdbm>/lib. 227 228 The install target will ask you if you accept the properties before starting. 229 To suppress this prompt, use the -Dproperties.accepted=yes flag. E.g. 230 ant -Dproperties.accepted=yes install 231 232 To log the output in build.log, run 233 ant -Dproperties.accepted=yes -logfile build.log install 234 235 Recompiling 236 ------------------------------------------------------- 237 To recompile your Greenstone3 installation, in the top level greenstone3 directory, run: 238 239 ant clean (use distclean instead if you want to regenerate the C++ Makefiles) 240 ant configure 241 ant configure-c++ 242 ant compile 243 244 The compile target does Java and C/C++ compilation. On Windows, you need to set the compile.windows.c++.setup property to be your Visual Studio setup batch file. 245 246 Any sub targets can be run by themselves. Run 'ant -projecthelp' for a list of public targets, otherwise you can look at the build.xml file to see which targets depend on other ones. 48 ant prepare 247 49 248 50 249 Notes on Versions of Third Party packages 250 ----------------------------------------------- 51 Edit build.xml line 722 from: 251 52 252 Tomcat: 53 <condition property="gs2.opt.args" value="${opt.gnomelibext.arg} " else="--disable-mg --disable-mgpp --disable-accentfold --disable-gdbm --disable-sqlite"> 54 to: 55 <condition property="gs2.opt.args" value="${opt.gnomelibext.arg} --disable-wvware " else="--disable-mg --disable-mgpp --disable-accentfold --disable-gdbm --disable-sqlite"> 253 56 254 apache-tomcat-5.5.12.zip: latest production quality release as of October, 2005.255 apache-tomcat-5.5.12-compat.zip: Tomcat 5 requires Java 1.5. If using Java 1.4, need to use this compatibility module.256 57 257 website: http://tomcat.apache.org/ 258 download: http://tomcat.apache.org/download-55.cgi 58 5. Test you have an operational Greenstone3 base system: 259 59 260 Axis: 60 source ./gs3-setup.sh 61 ant start 261 62 262 Apache Web Services Project, SOAP implementation. Axis is a follow on project to Apache SOAP 63 In your browser, visit: 263 64 264 axis-bin-1_2_1.zip: latest stable release as of October, 2005 265 website: http://ws.apache.org/axis/ 266 download: http://www.apache.org/dyn/closer.cgi/ws/axis/1_2_1 65 http://localhost:8383/greenstone3/library 267 66 268 All available from www.greenstone.org/gs3files if not available at their respective websites. 67 If working on a remote compute, such as a Google Compute Engine, use its console/dashboard 68 to look up the IP number of the machine, and also add in a firewall rule to open up 69 port 8080 269 70 270 Other Notes: 271 ------------------------------------------------- 71 ant stop 72 272 73 273 See greenstone3/docs/manual/manual.pdf for more details about the software and installation etc. 74 6. Check out the Eurovision-LOD Site and Iterface 274 75 275 Output is logged to web/logs. usage.log is a usage log, while greenstone.log is the error/message log. To change the level of logging, edit the web/WEB-INF/classes/log4j.properties file, and change the log4j.disable and log4j.rootCategory properties. Valid values are TRACE, DEBUG, INFO, WARN, ERROR and FATAL.276 76 277 To prevent Tomcat showing directory listings, edit Tomcat's conf/web.xml file and set the value of the "listings" servlet parameter to false. 77 svn co https://svn.greenstone.org/main/trunk/model-sites-dev/eurovision-lod web/sites/eurovision-lod 278 78 279 To enable symlinks to files outside the webapp root directory, edit Tomcat's conf/Catalina/localhost/greenstone3.xml file, and set the allowLinking attribute in the Context element to true. 280 (Note from Tomcat website: This flag MUST NOT be set to true on the Windows platform (or any other OS which does not have a case sensitive filesystem), as it will disable case sensitivity checks, allowing JSP source code disclosure, among other security problems.) 79 svn co https://svn.greenstone.org/main/trunk/model-interfaces-dev/eurovision-lod web/interfaces/eurovision-lod 281 80 282 The file web/WEB-INF/classes/global.properties is generated on install and contains some properties for the run time system.283 81 82 83 84 svn co https://svn.greenstone.org/gs2-extensions/apache-jena/trunk/src gs2build/ext/apache-jena
Note:
See TracChangeset
for help on using the changeset viewer.