source: trunk/gsdl3/README.txt@ 13383

Last change on this file since 13383 was 13383, checked in by kjdon, 17 years ago

brought these files a bit more up to date

  • Property svn:keywords set to Author Date Id Revision
File size: 13.3 KB
Line 
1Greenstone 3 (GSDL3)
2Copyright (C) 2003 New Zealand Digital Libraries, University Of Waikato
3Greenstone3 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. You need the SDK (development environment). Set the environment variable JAVA_HOME to be the root of your Java installation.
9
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
11
12In the greenstone3 directory, you can run 'ant' which will give you a help message.
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.
15
16Installing Greenstone
17---------------------------------------------------------
18
19[TODO: check once release is done]
20Download the appropriate installer from sourceforge.net/projects/greenstone3 and run it.
21
22See 'Installing from a Source Distribution' section below for extra notes about installing from Source.
23
24See the README-CVS.txt file for extra notes about installing from CVS.
25
26Running Greenstone:
27---------------------------------------------------------
28
29To start up the local Tomcat server, run 'ant start'.
30'ant restart' and 'ant stop' restarts and shuts down the server.
31This will only start/stop a local server (one installed by Greenstone). You will need to manually start/stop external Tomcat.
32
33Once the Tomcat server is running, Greenstone will be available in a browser at "http://localhost:8080/greenstone3" (or whatever port you specified during the
34installation process).
35You can change the port number by changing the 'tomcat.port' property in build.properties, then running 'ant configure'.
36
37[TODO: notes about running server program]
38
39Building Collections:
40----------------------------------------------------------
41
42You need to have Perl installed and on your PATH. Perl is included as part of
43the Windows binary distribution.
44run 'ant gli", or cd to greenstone3/gli and run gli4gs3.sh/bat. This is a
45graphical tool for building collections. Once you have created and built a
46collection, you can see it by clicking 'Preview collection' on the Build panel.
47
48Note that GLI doesn't start up the Greenstone Tomcat server so you should
49run 'ant start' before previewing your collection.
50Greenstone Admin
51------------------------------------------------------
52
53[TODO: notes about admin tool]
54
55Using SOAP:
56-------------------------------------------------------
57
58Greenstone comes with Apache Axis installed as part of the Greenstone web application. However, no SOAP services are deployed by default.
59
60To deploy a SOAP server for localsite, run 'ant deploy-localsite'. You should now be able to see all localsite's collections through the gateway servlet. (http://localhost:8080/greenstone3/gateway)
61
62To set up a SOAP server on a new site, run
63ant soap-deploy-site
64This 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.
65
66For a non-interactive version, run
67ant -Daxis.sitename=xxx -Daxis.siteuri=yyy soap-deploy-site
68
69The service is accessible at http://localhost:8080/greenstone3/services/<siteuri>
70(or http://<computer-web-address>:<port>/greenstone3/services/<siteuri>)
71
72
73Using External Tomcat:
74---------------------------------------------------
75
76If you want to use an existing Tomcat, set the path to its base directory
77in build.properties (tomcat.installed.path)
78
79 You will need to modify the Tomcat setup slightly.
80
811. Tell Tomcat about the Greenstone web app. There are two ways to do this.
82
83A. Copy the file greenstone3/resources/tomcat/greenstone3.xml into Tomcat's conf/Catalina/localhost directory. You'll need to edit the file and replace @gsdl3webdir@ with the full path to the web directory of your greenstone 3 installation. Any path separator is fine here ('/', '\\', '\').
84
85B. Alternatively, you can move (and rename) the greenstone3/web directory to tomcat/webapps/greenstone3 (i.e. the resulting directories will be like
86tomcat/webapps/greenstone3/WEB-INF, no web directory). This should be done after running the initial 'ant install'.
87
88You will need to set the web.home property in the build.properties file
89i.e.
90web.home=${tomcat.installed.path}/webapps/greenstone3
91And then run 'ant configure-web' to reset gsdl3home.
92
932. Set up the JNI libraries and Java wrappers.
94JNI 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.
95The wrappers need to be loaded by this too.
96
97These JNI bits are located by default in the lib/jni directory. There are two ways to get them into Tomcat:
98A: Keep all the Greenstone stuff inside the greenstone3 directory, and just modify the environment that Tomcat runs in
99
100Set LD_LIBRARY_PATH (GNU/Linux), DYLD_LIBRARY_PATH (Mac OS X) or PATH/Path (windows) to include the greenstone3/lib/jni directory.
101Add all the jar files in greenstone3/lib/jni directory to the CLASSPATH, then edit tomcats setclasspath.sh/bat to use the system CLASSPATH.
102(in setclasspath.bat, change
103set CLASSPATH=%JAVA_HOME%\lib\tools.jar
104to
105set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH%
106
107in setclasspath.sh, change
108# Set standard CLASSPATH
109if [ "$1" = "debug" -o "$1" = "javac" ] ; then
110 CLASSPATH="$JAVA_HOME"/lib/tools.jar
111fi
112
113to
114# Set standard CLASSPATH
115if [ "$1" = "debug" -o "$1" = "javac" ] ; then
116 CLASSPATH="$JAVA_HOME"/lib/tools.jar:"$CLASSPATH"
117fi
118
119
120B: Copy the files into Tomcat installation:
121Move the greenstone3/lib/jni jar files into tomcat's shared/lib directory.
122Move the greenstone3/lib/jni library files (.so for GNU/Linux, .jnilib for Mac OS X .dll for Windows) into shared/classes, and set LD_LIBARARY_PATH (GNU/Linux), DYLD_LIBRARY_PATH (Mac OS X) or PATH/Path (Windows) to include this directory.
123 This has the advantage that you can use this for other webapps without modifying the Tomcat environment.
124
125Once all these changes have been made, you will need to restart the Tomcat server for them to take effect.
126
127
128Notes for Mac OS
129------------------------------------------------
130
131Set JAVA_HOME to be /Library/Java/Home
132
133Notes for Windows
134-----------------------------------------------
135
136You can set environment variables by going to Control Panel->System->Advanced->Environment Variables.
137
138Installing from a Source Distribution
139----------------------------------------------
140
141Download the greenstone-3.xx-src.tar.gz package from sourceforge.net/projects/greenstone3, and unpack it.
142In the greenstone3 directory, edit the build.properties file and run
143ant prepare install
144
145Tomcat will be installed as part of the prepare process. To stop this set the tomcat.installed.path to be the root of an existing Tomcat installation.
146
147* Solaris notes:
148** Make sure /usr/local/bin is in your PATH ahead of /usr/bin etc.
149** Add /usr/local/lib to LD_LIBARY_PATH
150** 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:
151in greenstone3/gs2build directory: run 'source setup.bash' (Or if you have greenstone 2 already installed, run 'source setup.bash' in your greenstone 2 installation)
152in greenstone3/web/sites/localsite/collect/gs2mgdemo/index/text directories, run 'txt2db gs2mgdemo.bdb < database.txt'
153in greenstone3/web/sites/localsite/collect/gs2mgppdemo/index/text directories, run 'txt2db gs2mgppdemo.bdb < database.txt'
154** 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).
155** Set CC=gcc environment variable if you don't have cc, before running ant install.
156
157* Windows notes:
158** The main install target doesn't do C++ compiling on Windows. You'll need Visual Studio 6, and run the compile-windows-c++ target, i.e.
159ant prepare install compile-windows-c++
160Don'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.
161
162Configuring your installation:
163--------------------------------------------------------
164
165The file build.properties contains various parameters that can be set by the user. Please check these settings before running the install.
166Note, either forward slash '/' or double backslash '\\' can be used as path separators in the build.properties file, but not single backslash '\'.
167
168Greenstone 3 comes with Tomcat bundled in.
169
170If 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.
171
172Mac 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.
173
174The install target will ask you if you accept the properties before starting.
175To suppress this prompt, use the -Dproperties.accepted=yes flag. E.g.
176ant -Dproperties.accepted=yes install
177
178To log the output in build.log, run
179ant -Dproperties.accepted=yes -logfile build.log install
180
181Recompiling
182-------------------------------------------------------
183To recompile your Greenstone3 installation, in the top level greenstone3 directory, run:
184
185ant configure
186ant configure-c++
187ant clean
188ant compile
189
190The compile target, under GNU/Linux and Mac OS X, 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.)
191
192Any 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.
193
194If 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 http://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.
195
196
197Notes on Versions of Third Party packages
198-----------------------------------------------
199
200Tomcat:
201
202apache-tomcat-5.5.12.zip: latest production quality release as of October, 2005.
203apache-tomcat-5.5.12-compat.zip: Tomcat 5 requires Java 1.5. If using Java 1.4, need to use this compatibility module.
204
205website: http://tomcat.apache.org/
206download: http://tomcat.apache.org/download-55.cgi
207
208Axis:
209
210Apache Web Services Project, SOAP implementation. Axis is a follow on project to Apache SOAP
211
212axis-bin-1_2_1.zip: latest stable release as of October, 2005
213website: http://ws.apache.org/axis/
214download: http://www.apache.org/dyn/closer.cgi/ws/axis/1_2_1
215
216All available from www.greenstone.org/gs3files if not available at their respective websites.
217
218Other Notes:
219-------------------------------------------------
220
221See greenstone3/docs/manual/manual.pdf for more details about the software and installation etc.
222
223Output 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 property. Valid values are TRACE, DEBUG, INFO, WARN, ERROR and FATAL.
224
225To prevent Tomcat showing directory listings, edit Tomcat's conf/web.xml file and set the value of the "listings" servlet parameter to false.
226
227To 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.
228(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.)
229
230The file web/WEB-INF/classes/global.properties is generated on install and contains some properties for the run time system.
231
Note: See TracBrowser for help on using the repository browser.