source: trunk/gsdl3/README.txt@ 10715

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

notes about versions of things

  • Property svn:keywords set to Author Date Id Revision
File size: 15.3 KB
Line 
1Greenstone 3 (GSDL3)
2Copyright (C) 2003 New Zealand Digital Libraries, University Of Waikato
3GSDL3 comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
4This is free software, and you are welcome to redistribute it
5
6You will need Java and Ant to run Greenstone 3.
7
8Your Java version should be 1.4 or higher. We recommend Sun Java. If you are installing Greenstone from a binary distribution, you will only need the JRE (Runtime environment). If you are installing Greenstone from CVS, you will need the SDK (Development environment).
9Set the environment variable JAVA_HOME to be the root of your Java installation.
10
11Ant (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
12
13In the gsdl3 directory, you can run 'ant' which will give you a help message.
14Running 'ant -projecthelp' gives a list of the targets that you can run - these
15do various things like compile the source code, start up the server etc.
16
17Installing Greenstone from a binary distribution:
18---------------------------------------------------------
19
20Download the appropriate zip/tar file (gsdl3-x.xx-linux.tar.gz/gsdl3-x.xx-win32.zip/gsdl3-x.xx-macOSX.tar.gz), and unzip/untar it. In the gsdl3 directory, edit the build.properties file if appropriate (see 'Configuring your installation' below), and run 'ant install'.
21
22Installing Greenstone from a CVS checkout (Linux/Windows/MacOS X):
23---------------------------------------------------------------------
24
25Make sure the CVS executable is on your PATH.
26
27Checkout the code:
28
29cvs -d :pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src co gsdl3
30
31Build and install:
32
33In the gsdl3 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.
34
35The '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.
36
37Mac 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.
38
39Configuring your installation:
40------------------------------------
41
42The file build.properties contains various parameters that can be set by the user. Please check these settings before running the install.
43
44Greenstone 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.
45
46Greenstone 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.
47
48Greenstone 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.
49
50The prepare/install target will ask you if you accept the properties before starting.
51To suppress this prompt, use the -Dproperties.accepted=yes flag. E.g.
52ant -Dproperties.accepted=yes prepare install (from CVS), or
53ant -Dproperties.accepted=yes install (from binary dist).
54
55To log the output in build.log, run
56ant -Dproperties.accepted=yes -logfile build.log prepare install (from CVS), or
57ant -Dproperties.accepted=yes -logfile build.log install (from binary dist).
58
59The 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 (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.)
60
61Common install/update targets (for use with Greenstone out of CVS).
62-------------------------------
631. Install for the first time from CVS:
64cvs co gsdl3
65cd gsdl3
66ant prepare install
67
682. Install for the first time from CVS, mostly offline:
69[online]
70cvs co gsdl3
71cd gsdl3
72ant prepare
73[offline]
74ant install
75
763. Install for the first time, with CVS done outside of Ant (if you have problems running CVS commands from Ant):
77cvs co -P gsdl3
78cd gsdl3/packages
79cvs co mgpp
80cd ..
81[if you want greenstone 2 building:
82cvs co -P gli
83cvs co -P gs2build
84]
85[if you are on windows
86cvs co winbin
87]
88ant -Dnocvs.mode=yes prepare install (prepare needs to be online, install can be done offline)
89
904. Updating your Greenstone installation from CVS (and reconfigure/recompile):
91cd gsdl3
92ant update
93
945. Updating your Greenstone installation from CVS, offline:
95cd gsdl3
96[online]
97ant cvsupdate
98[offline]
99ant -Dnocvs.mode=yes update
100
1016. Updating your Greenstone installation, with CVS done outside of Ant:
102cd gsdl3
103cvs update -l
104cvs update -dP bin comms docs lib resources src winutil packages
105cd web (or the path-to-tomcat/webapps/gsdl3 if have installed greenstone as a webapp in Tomcat, see Using External Tomcat section)
106cvs update -dP
107cd gsdl3
108[ if you have greenstone 2 building:
109cvs update -dP gli
110cvs checkout -P gs2build
111Note that the gs2build one uses checkout not update.
112]
113ant -Dnocvs.mode=yes update
114
115The main targets for installation/update are:
116configure, configure-c++, clean, compile.
117Any 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.
118
119If 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/gsdl3/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.
120
121Running Greenstone:
122-------------------
123
124To 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.
125These will only start/stop local servers (ones installed by Greenstone). You will need to manually start/stop external Tomcat/mysql.
126
127Greenstone will be available in a browser at "http://localhost:8080/gsdl3".
128
129You can change the port number by changing the 'tomcat.port' property in build.properties, then running 'ant configure'.
130
131
132Using SOAP (Linux and Windows):
133-------------------------------
134
135Greenstone 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.
136
137To set up a SOAP server on a new site, run
138ant soap-deploy-site
139This 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.
140
141For a non-interactive version, run
142ant -Daxis.sitename=xxx -Daxis.siteuri=yyy soap-deploy-site
143
144The service is accessible at http://localhost:8080/gsdl3/services/<siteuri>
145(or http://<computer-web-address>:<port>/gsdl3/services/<siteuri>)
146
147Building Collections:
148-----------------------
149
150You can build collections using either Greenstone 2 style building, or native Greenstone 3 style.
151
152Greenstone 2:
153
154You need to have Perl installed and on your PATH. Perl is included as part of the Windows binary distribution.
155run 'ant gli", or cd to gsdl3/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.
156
157Note that GLI doesn't start up the Greenstone server (Tomcat/mysql) so you should run 'ant start' before previewing your collection.
158Greenstone 3:
159
160In the gsdl3 directory, run: 'source gs3-setup.sh' (Linux/Mac OS X) or 'gs3-setup' (windows).
161To create a new collection, run 'gs3-mkcol.sh/bat <sitename> <collname>'
162Put documents in the import directory (gsdl3/web/sites/<sitename>/collect/<collname>/import), edit the collection configuration file (gsdl3/web/sites/<sitename>/collect/<collname>/etc/collectionConfig.xml), and run 'gs3-build.sh <sitename> <collname>'
163Rename the building directory to index (in gsdl3/web/sites/<sitename>/collect/<collname>) and reload the collection in Tomcat (?a=s&sa=a&st=collection&sn=<collname>), or restart Tomcat.
164
165See the manual for more details about both styles of collection building.
166
167Other Notes:
168---------------
169
170See gsdl3/docs/manual/manual.pdf for more details about the software and installation etc.
171
172Under Linux, Tomcat logs output in gsdl3/comms/jakarta/tomcat/logs/catalina.out.
173
174To prevent Tomcat showing directory listings, edit the gsdl3/comms/jakarta/tomcat/conf/web.xml file and set the value of the "listings" servlet parameter to false.
175
176ant can't seem to do cvs using authenticated cvs on windows:
177there were some classes missing - www.ibiblio.org/maven/jsch/jars/jsch-0.1.17.jar
178many ssh processes seemed to be started up - all waiting in the background for password??
179So should only use anonymous cvs.
180
181Using External Tomcat:
182------------------------
183
184If you want to use an existing Tomcat, set the path to its base directory
185in 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.
186
187 You will need to modify the Tomcat setup slightly.
188
1891. Tell Tomcat about the Greenstone web app. There are two ways to do this.
190
191A. Add in the Greenstone context to Tomcat's server.xml (In the Host name="localhost".. element)
192
193<Context path="/gsdl3" docBase="path-to-gsdl3/web" debug="1"
194reloadable="true"><Resources allowLinking='true'/></Context>
195
196B. Alternatively, you can move (and rename) the gsdl3/web directory to tomcat/webapps/gsdl3 (i.e. the resulting directories will be like
197tomcat/webapps/gsdl3/WEB-INF, no web directory). This should be done after running the initial 'ant [prepare] install'.
198You will need to set the web.home property in the build.properties file
199i.e.
200web.home=${tomcat.installed.path}/webapps/gsdl3
201And then run 'ant configure-web' to reset gsdl3home.
202
2032. Set up the JNI libraries and Java wrappers.
204JNI 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.
205The wrappers need to be loaded by this too.
206To 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).
207
208These JNI bits are located by default in the lib/jni directory. There are two ways to get them into Tomcat:
209A: Keep all the Greenstone stuff inside the gsdl3 directory, and just modify the environment that Tomcat runs in
210
211Set LD_LIBRARY_PATH (linux) or PATH (windows) to include the gsdl3/lib/jni directory.
212Add all the jar files in gsdl3/lib/jni directory to the CLASSPATH, then edit tomcats setclasspath.sh/bat to use the system CLASSPATH.
213(in setclasspath.bat, change
214set CLASSPATH=%JAVA_HOME%\lib\tools.jar
215to
216set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH%
217
218in setclasspath.sh, change
219# Set standard CLASSPATH
220if [ "$1" = "debug" -o "$1" = "javac" ] ; then
221 CLASSPATH="$JAVA_HOME"/lib/tools.jar
222fi
223
224to
225# Set standard CLASSPATH
226if [ "$1" = "debug" -o "$1" = "javac" ] ; then
227 CLASSPATH="$JAVA_HOME"/lib/tools.jar:"$CLASSPATH"
228fi
229
230
231B: Copy the files into Tomcat installation:
232Move the gsdl3/lib/jni jar files into tomcat's shared/lib directory.
233Move the gsdl3/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.
234This has the advantage that you can use this for other webapps without modifying the Tomcat environment.
235
236Once all these changes have been made, you will need to restart the Tomcat server for them to take effect.
237
238Using External mysql server
239------------------------------
240
241Set the mysql.installed.path property in build.xml to be non-empty (its not actually used) before installation.
242
243You 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.
244
245Run mysql as the root user.
246
247Commands to add the two users:
248GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@localhost identified by 'admin-password';
249GRANT SELECT ON *.* TO gsdl3reader@localhost identified by 'reader-password';
250
251You will need to edit the gsdl3/web/WEB-INF/classes/global.properties file and set the two passwords that you used in here:
252mysql.admin.password and mysql.reader.password
253The mysql.tcp.port property specified here should be set to the port that your mysql is running on. (default 3306).
254
255You should also load up the database for the gs3mgdemo collection:
256create database localsite_gs3mgdemo;
257
258Close mysql, then run
259mysql localsite_gs3mgdemo < <path-to-gsdl3>/web/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql
260
261(Note that if you have installed the Greenstone web directory into Tomcats webapps dir, then this command will be
262mysql localsite_gs3mgdemo < <path-to-tomcat>/webapps/gsdl3/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql )
263
264You may need to run this using '--user=root -p'
265
266Notes for Mac OS
267------------------
268
269Set JAVA_HOME to be /Library/Java/Home
270
271Notes on Versions
272------------------
273
274Tomcat:
275jakarta-tomcat-5.5.7.zip & jakarta-tomcat-5.5.7-compat.zip
276Mysql:
277mysql-standard-4.1.11-pc-linux-gnu-i686.tar.gz
278mysql-standard-4.1.12-apple-darwin7.9.0-powerpc.tar.gz
279mysql-noinstall-4.1.11-win32.zip
280Axis:
281axis-bin-1_2_1.zip
282
283All available from www.greenstone.org/gs3files if not available at their respective websites.
Note: See TracBrowser for help on using the repository browser.