source: trunk/gsdl3/README.txt@ 10818

Last change on this file since 10818 was 10815, checked in by kjdon, 19 years ago

* empty log message *

  • Property svn:keywords set to Author Date Id Revision
File size: 16.2 KB
RevLine 
[6444]1Greenstone 3 (GSDL3)
2Copyright (C) 2003 New Zealand Digital Libraries, University Of Waikato
[10780]3Greenstone3 comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
[6444]4This is free software, and you are welcome to redistribute it
5
[10674]6You will need Java and Ant to run Greenstone 3.
[6444]7
[10741]8Your Java version should be 1.4 or higher. We recommend Sun Java. You need the SDK (development environment). Set the environment variable JAVA_HOME to be the root of your Java installation.
[6471]9
[10715]10Ant (Apache's Java based build tool) can be downloaded from http://ant.apache.org/bindownload.cgi. Set the environment variable ANT_HOME to be the root of your Ant installation, and make sure the Ant executables are on your PATH. You may have problems with earlier versions. This has been tested with version 1.6.2
[6471]11
[10780]12In the greenstone3 directory, you can run 'ant' which will give you a help message.
[10674]13Running 'ant -projecthelp' gives a list of the targets that you can run - these
14do various things like compile the source code, start up the server etc.
[6444]15
[10741]16On Linux mysql seems to have trouble with spaces in paths, so it's best to install Greenstone into a path with no spaces.
17
[10674]18Installing Greenstone from a binary distribution:
19---------------------------------------------------------
[7892]20
[10780]21Download the appropriate zip/tar file (greenstone-3.xx-linux.tar.gz/greenstone-3.xx-win32.zip/greenstone-3.xx-macOSX.tar.gz), and unzip/untar it. In the greenstone3 directory, edit the build.properties file if appropriate (see 'Configuring your installation' below), and run 'ant install'.
[6444]22
[10674]23Installing Greenstone from a CVS checkout (Linux/Windows/MacOS X):
24---------------------------------------------------------------------
25
26Make sure the CVS executable is on your PATH.
27
[9874]28Checkout the code:
[8428]29
[10780]30cvs -d :pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src co greenstone3
[6444]31
[9874]32Build and install:
[6444]33
[10780]34In the greenstone3 directory, edit the build.properties file if appropriate (see 'Configuring your installation' below), and run 'ant prepare install'. The two targets can be run separately if you like.
[6444]35
[10674]36The 'prepare' target will download additional code (using CVS and http), so you need to be online to run it. The 'install' target can be run offline.
[10236]37
[10703]38Mac OS X: If you want to do Greenstone 2 style collection building, 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.
39
[10674]40Configuring your installation:
41------------------------------------
[6471]42
[10117]43The file build.properties contains various parameters that can be set by the user. Please check these settings before running the install.
[9892]44
[10703]45Greenstone 3 uses the Tomcat servlet container. 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 download/install its own Tomcat. Please read the section "Using External Tomcat" for details about how to configure Tomcat for Greenstone.
[10135]46
[10703]47Greenstone 3 uses mysql for the collection database (with Greenstone 3 native building). If you already have mysql installed, set the 'mysql.installed.path' property (in build.properties) to the base directory of your mysql installation, and Greenstone will not download/install mysql. Please read the section "Using external mysql server" for details about how to configure mysql for Greenstone.
[10800]48If you are using mysql that comes with greenstone 3, and you are installing greenstone 3 on an NFS drive, mysql may not work properly (it has problems removing locks on its data files). After installation, copy the data directory from greenstone3/packages/mysql to a local drive, then set the path to this directory in the mysql.datadir property in build.properties.
[10804]49If the version of mysql that greenstone is using is not suitable for your setup (see notes on versions below), please install an appropriate version and set the mysql.installed.path property.
[7805]50
[10703]51Greenstone 3 uses some parts of Greenstone 2 for collection building using the Librarian Interface. These will be installed during the Greenstone 3 installation process. If you have Greenstone 2 already installed and want to use that version instead, please set the gsdl2.installed.path property (in build.properties) to be the root of your Greenstone 2 installation. Greenstone 3 will then use this installation rather than its own bits. (Note, be careful about compatibility between versions.) If you are using Greenstone 3 from CVS, and don't want to download the Greenstone 2 stuff, set the gsdl2.installed.path to any non-empty string.
[10674]52
53The prepare/install target will ask you if you accept the properties before starting.
[10117]54To suppress this prompt, use the -Dproperties.accepted=yes flag. E.g.
[10674]55ant -Dproperties.accepted=yes prepare install (from CVS), or
56ant -Dproperties.accepted=yes install (from binary dist).
[10117]57
[9874]58To log the output in build.log, run
[10674]59ant -Dproperties.accepted=yes -logfile build.log prepare install (from CVS), or
60ant -Dproperties.accepted=yes -logfile build.log install (from binary dist).
[7805]61
[10815]62The compile target, under Linux, does Java and C/C++ compilation. For Windows, since Visual Studio is not a standard component, only Java compilation is carried out. Pre-compiled binaries are provided for the C/C++ components (src/packages and Greenstone 2 style building). If you have Visual Studio installed (version 6), you can run the compile-windows-c++ targets to compile the code locally. (Don't forget to setup the Visual Studio environment first, by running, e.g. C:/Program Files/Microsoft Visual Studio/VC98/Bin/VCVARS32.BAT or equivalent.)
[10117]63
[10703]64Common install/update targets (for use with Greenstone out of CVS).
[10117]65-------------------------------
[10674]661. Install for the first time from CVS:
[10780]67cvs co greenstone3
68cd greenstone3
[10117]69ant prepare install
70
[10674]712. Install for the first time from CVS, mostly offline:
[10117]72[online]
[10780]73cvs co greenstone3
74cd greenstone3
[10117]75ant prepare
76[offline]
77ant install
78
[10674]793. Install for the first time, with CVS done outside of Ant (if you have problems running CVS commands from Ant):
[10780]80cvs co -P greenstone3
[10815]81cd greenstone3/src/packages
[10195]82cvs co mgpp
[10815]83cd ../..
[10195]84[if you want greenstone 2 building:
85cvs co -P gli
86cvs co -P gs2build
87]
88[if you are on windows
89cvs co winbin
90]
91ant -Dnocvs.mode=yes prepare install (prepare needs to be online, install can be done offline)
92
[10674]934. Updating your Greenstone installation from CVS (and reconfigure/recompile):
[10780]94cd greenstone3
[10117]95ant update
96
[10674]975. Updating your Greenstone installation from CVS, offline:
[10780]98cd greenstone3
[10117]99[online]
100ant cvsupdate
101[offline]
[10195]102ant -Dnocvs.mode=yes update
[10117]103
[10674]1046. Updating your Greenstone installation, with CVS done outside of Ant:
[10780]105cd greenstone3
[10195]106cvs update -l
[10815]107cvs update -dP extensions bin comms docs lib resources src winutil packages
[10780]108cd web (or the path-to-tomcat/webapps/greenstone3 if have installed greenstone as a webapp in Tomcat, see Using External Tomcat section)
[10195]109cvs update -dP
[10780]110cd greenstone3
[10195]111[ if you have greenstone 2 building:
112cvs update -dP gli
113cvs checkout -P gs2build
114Note that the gs2build one uses checkout not update.
115]
116ant -Dnocvs.mode=yes update
117
[10117]118The main targets for installation/update are:
119configure, configure-c++, clean, compile.
120Any 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.
121
[10780]122If you run your install using an external Tomcat, the SOAP web service for localsite (used by the gateway servlet) will not be loaded. You need to start up Tomcat, then run 'ant soap-deploy-site' and accept the defaults for sitename and siteuri (both localsite). If you want to use the gateway servlet without restarting Tomcat, you will need to reload the site information. Visit the URL localhost:8080/greenstone3/gateway?a=s&sa=c (substituting your server name and port number if necessary). See the user guide for more information about run time reconfiguration.
[10135]123
[9874]124Running Greenstone:
125-------------------
[6471]126
[10117]127To startup the local servers, run 'ant start'. 'ant restart' and 'ant stop' restarts and shuts down the servers. To start or stop just Tomcat or MYSQL, use the start-tomcat, start-mysql, stop-tomcat, stop-mysql targets.
128These will only start/stop local servers (ones installed by Greenstone). You will need to manually start/stop external Tomcat/mysql.
[6471]129
[10780]130Greenstone will be available in a browser at "http://localhost:8080/greenstone3".
[6471]131
[10674]132You can change the port number by changing the 'tomcat.port' property in build.properties, then running 'ant configure'.
[10117]133
134
[9874]135Using SOAP (Linux and Windows):
136-------------------------------
[6471]137
[10674]138Greenstone comes with Apache Axis installed as part of the Greenstone web application. A SOAP server on localsite is deployed during installation. You should be able to see all localsite's collections through the gateway servlet.
[6444]139
[9874]140To set up a SOAP server on a new site, run
141ant soap-deploy-site
142This will prompt you for the sitename (the directory name), and the site uri - this should be a unique identifier for the site's web service.
[6471]143
[9874]144For a non-interactive version, run
145ant -Daxis.sitename=xxx -Daxis.siteuri=yyy soap-deploy-site
[7984]146
[10780]147The service is accessible at http://localhost:8080/greenstone3/services/<siteuri>
148(or http://<computer-web-address>:<port>/greenstone3/services/<siteuri>)
[10674]149
[9874]150Building Collections:
151-----------------------
[7984]152
[9874]153You can build collections using either Greenstone 2 style building, or native Greenstone 3 style.
[7984]154
[9874]155Greenstone 2:
[7984]156
[10674]157You need to have Perl installed and on your PATH. Perl is included as part of the Windows binary distribution.
[10780]158run 'ant gli", or cd to greenstone3/gli and run gli4gs3.sh/bat. This is a graphical tool for building collections. Once you have created and built a collection, you can see it by clicking 'Preview collection' on the Build panel.
[6471]159
[10694]160Note that GLI doesn't start up the Greenstone server (Tomcat/mysql) so you should run 'ant start' before previewing your collection.
[9874]161Greenstone 3:
162
[10780]163In the greenstone3 directory, run: 'source gs3-setup.sh' (Linux/Mac OS X) or 'gs3-setup' (windows).
[9874]164To create a new collection, run 'gs3-mkcol.sh/bat <sitename> <collname>'
[10780]165Put documents in the import directory (greenstone3/web/sites/<sitename>/collect/<collname>/import), edit the collection configuration file (greenstone3/web/sites/<sitename>/collect/<collname>/etc/collectionConfig.xml), and run 'gs3-build.sh <sitename> <collname>'
166Rename the building directory to index (in greenstone3/web/sites/<sitename>/collect/<collname>) and reload the collection in Tomcat (?a=s&sa=a&st=collection&sn=<collname>), or restart Tomcat.
[9874]167
168See the manual for more details about both styles of collection building.
169
170Other Notes:
171---------------
172
[10780]173See greenstone3/docs/manual/manual.pdf for more details about the software and installation etc.
[6471]174
[10780]175Under Linux, Tomcat logs output in greenstone3/comms/jakarta/tomcat/logs/catalina.out.
[9874]176
[10780]177To prevent Tomcat showing directory listings, edit the greenstone3/comms/jakarta/tomcat/conf/web.xml file and set the value of the "listings" servlet parameter to false.
[7891]178
[9874]179ant can't seem to do cvs using authenticated cvs on windows:
180there were some classes missing - www.ibiblio.org/maven/jsch/jars/jsch-0.1.17.jar
181many ssh processes seemed to be started up - all waiting in the background for password??
182So should only use anonymous cvs.
183
[10068]184Using External Tomcat:
185------------------------
186
187If you want to use an existing Tomcat, set the path to its base directory
[10316]188in build.properties (tomcat.installed.path) (on windows need to use double backslashes in paths '\\'). Then run 'ant prepare install'. If you have already done an install (e.g. using a local Tomcat), you don't need to do it again.
[10068]189
[10096]190 You will need to modify the Tomcat setup slightly.
[10068]191
[10096]1921. Tell Tomcat about the Greenstone web app. There are two ways to do this.
193
[10316]194A. Add in the Greenstone context to Tomcat's server.xml (In the Host name="localhost".. element)
[10096]195
[10780]196<Context path="/greenstone3" docBase="path-to-greenstone3/web" debug="1"
[10068]197reloadable="true"><Resources allowLinking='true'/></Context>
198
[10780]199B. Alternatively, you can move (and rename) the greenstone3/web directory to tomcat/webapps/greenstone3 (i.e. the resulting directories will be like
200tomcat/webapps/greenstone3/WEB-INF, no web directory). This should be done after running the initial 'ant [prepare] install'.
[10068]201You will need to set the web.home property in the build.properties file
[10096]202i.e.
[10780]203web.home=${tomcat.installed.path}/webapps/greenstone3
[10302]204And then run 'ant configure-web' to reset gsdl3home.
[10068]205
2062. Set up the JNI libraries and Java wrappers.
207JNI libraries and their Java wrappers cannot go into the web app. The libraries need to be loaded by the same class loader as their wrappers. The libraries need to be in java.library.path, and I think get loaded by the system class loader.
208The wrappers need to be loaded by this too.
209To get the native libraries loaded, the directory they are in needs to be in the PATH variable (Windows) or the LD_LIBRARY_PATH variable (linux).
210
211These JNI bits are located by default in the lib/jni directory. There are two ways to get them into Tomcat:
[10780]212A: Keep all the Greenstone stuff inside the greenstone3 directory, and just modify the environment that Tomcat runs in
[10068]213
[10780]214Set LD_LIBRARY_PATH (linux) or PATH (windows) to include the greenstone3/lib/jni directory.
215Add all the jar files in greenstone3/lib/jni directory to the CLASSPATH, then edit tomcats setclasspath.sh/bat to use the system CLASSPATH.
[10068]216(in setclasspath.bat, change
217set CLASSPATH=%JAVA_HOME%\lib\tools.jar
218to
219set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH%
220
221in setclasspath.sh, change
222# Set standard CLASSPATH
223if [ "$1" = "debug" -o "$1" = "javac" ] ; then
224 CLASSPATH="$JAVA_HOME"/lib/tools.jar
225fi
226
227to
228# Set standard CLASSPATH
229if [ "$1" = "debug" -o "$1" = "javac" ] ; then
[10320]230 CLASSPATH="$JAVA_HOME"/lib/tools.jar:"$CLASSPATH"
[10068]231fi
232
233
234B: Copy the files into Tomcat installation:
[10780]235Move the greenstone3/lib/jni jar files into tomcat's shared/lib directory.
236Move the greenstone3/lib/jni library files (.so for linux, .dll for windows) into shared/classes, and set LD_LIBARARY_PATH (linux) or PATH (windows) to include this directory.
[10068]237This has the advantage that you can use this for other webapps without modifying the Tomcat environment.
238
[10096]239Once all these changes have been made, you will need to restart the Tomcat server for them to take effect.
[10068]240
[10302]241Using External mysql server
242------------------------------
243
[10312]244Set the mysql.installed.path property in build.xml to be non-empty (its not actually used) before installation.
245
[10302]246You will need to add the two greenstone users: gsdl3reader and gsdl3admin. The reader user is only used for accessing the database, the admin user can be used for modification.
247
[10312]248Run mysql as the root user.
249
[10302]250Commands to add the two users:
[10312]251GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@localhost identified by 'admin-password';
252GRANT SELECT ON *.* TO gsdl3reader@localhost identified by 'reader-password';
[10302]253
[10780]254You will need to edit the greenstone3/web/WEB-INF/classes/global.properties file and set the two passwords that you used in here:
[10671]255mysql.admin.password and mysql.reader.password
[10316]256The mysql.tcp.port property specified here should be set to the port that your mysql is running on. (default 3306).
[10302]257
[10312]258You should also load up the database for the gs3mgdemo collection:
259create database localsite_gs3mgdemo;
260
261Close mysql, then run
[10780]262mysql localsite_gs3mgdemo < <path-to-greenstone3>/web/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql
[10671]263
264(Note that if you have installed the Greenstone web directory into Tomcats webapps dir, then this command will be
[10780]265mysql localsite_gs3mgdemo < <path-to-tomcat>/webapps/greenstone3/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql )
[10671]266
[10312]267You may need to run this using '--user=root -p'
268
[10195]269Notes for Mac OS
270------------------
[10068]271
[10195]272Set JAVA_HOME to be /Library/Java/Home
[10715]273
274Notes on Versions
275------------------
276
277Tomcat:
278jakarta-tomcat-5.5.7.zip & jakarta-tomcat-5.5.7-compat.zip
279Mysql:
[10804]280mysql-standard-4.1.15-pc-linux-gnu-i686.tar.gz (Linux, x86, glibc-2.2, static (Standard only), gcc)
281mysql-standard-4.1.15-apple-darwin7.9.0-powerpc.tar.gz (Mac OS X v10.3, without installer)
282mysql-noinstall-4.1.15-win32.zip (Windows, without installer)
[10715]283Axis:
284axis-bin-1_2_1.zip
285
286All available from www.greenstone.org/gs3files if not available at their respective websites.
Note: See TracBrowser for help on using the repository browser.