source: trunk/gsdl3/README.txt@ 10128

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

fixed a couple of typos.

  • Property svn:keywords set to Author Date Id Revision
File size: 9.5 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
6Installing Greenstone from a binary distribution (Linux):
7---------------------------------------------------------
8
9Download the gsdl3-x.xx-linux executable file, and run it. Follow the instructions given.
10
11Installing Greenstone from a binary distribution (Windows):
12-----------------------------------------------------------
13
14Download the gsdl3-x.xx-win32.exe executable file, and double click on it.
15Follow the instructions given.
16
17
18Installing Greenstone from a CVS checkout (Linux and Windows):
19--------------------------------------------------------------
20
21Checkout the code:
22
23cvs -d :pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src co gsdl3
24
25Build and install:
26
27Greenstone is built and installed using Ant (Apache's Java based build tool,
28http://ant.apache.org). You will need a Java Development
29Environment (1.4 or higher), and Ant installed to use Greenstone. You can download Ant from http://ant.apache.org/bindownload.cgi. Set the environment variable JAVA_HOME to be the root of your Java installation. We recommend Sun's Java. Greenstone 3 has not been tested with other types of Java.
30
31In the gsdl3 directory, you can run 'ant' which will give you a help message.
32Running 'ant -projecthelp' gives a list of the targets that you can run - these
33do various things like compile the source code, startup the server etc.
34
35For a first time install, run 'ant prepare install'.
36
37The file build.properties contains various parameters that can be set by the user. Please check these settings before running the install.
38
39Greenstone 3 uses some parts of Greenstone 2 for collection building using the Librarian Interface. It downloads the relevant parts during install. If you have Greenstone 2 already installed, please set the gsdl2.installed.path property to be the root of your Greenstone 2 installation. Greenstone 3 will then use this installation rather than downloading the extra Greenstone 2 bits. If you do not want to use Greenstone 2 style collection building at all, set the gsdl2.installed.path to any non-empty string.
40
41 The prepare target will ask you if you accept the properties before starting.
42To suppress this prompt, use the -Dproperties.accepted=yes flag. E.g.
43ant -Dproperties.accepted=yes prepare install
44
45To log the output in build.log, run
46ant -Dproperties.accepted=yes -logfile build.log prepare install
47
48The prepare target will download additional code, so you need to be online to run it. install can be run offline.
49
50Under Linux, Java and C/C++ compilation is carried out. 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.)
51
52Common install/update targets.
53-------------------------------
541. Install for the first time:
55cvs co gsdl3
56ant prepare install
57
582. Install for the first time, offline:
59[online]
60cvs co gsdl3
61ant prepare
62[offline]
63ant install
64
653. Updating your Greenstone installation from cvs:
66ant update
67
684. Updating your Greenstone installation, offline:
69[online]
70ant cvsupdate
71[offline]
72ant -Doffline.mode=yes update
73
74The main targets for installation/update are:
75configure, configure-c++, clean, compile.
76Any 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.
77
78Running Greenstone:
79-------------------
80
81To 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.
82These will only start/stop local servers (ones installed by Greenstone). You will need to manually start/stop external Tomcat/mysql.
83
84On Windows, if you have installed a binary version, you can also start Greenstone by selecting Greenstone 3 Digital Library from the Start menu.
85
86Greenstone will be available in a browser at "http://localhost:8080/gsdl3".
87
88You can change the port number by changing the tomcat.port property in build.properties, then running 'ant configure'.
89
90
91Using SOAP (Linux and Windows):
92-------------------------------
93
94Greenstone comes with Apache Axis installed as a webapp in Tomcat. A SOAP server on localsite is deployed during installation. You should be able to see all localsite's collections through the gateway servlet.
95
96To set up a SOAP server on a new site, run
97ant soap-deploy-site
98This 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.
99
100For a non-interactive version, run
101ant -Daxis.sitename=xxx -Daxis.siteuri=yyy soap-deploy-site
102
103Building Collections:
104-----------------------
105
106You can build collections using either Greenstone 2 style building, or native Greenstone 3 style.
107
108Greenstone 2:
109
110You need to have Perl installed and on your PATH.
111run 'ant gli", or cd to gsdl3/gli and run gli4gs3.sh/bat. This is a graphical tool for building collections.
112
113Greenstone 3:
114
115In the gsdl3 directory, run: 'source gs3-setup.sh' (linux) or 'gs3-setup' (windows).
116To create a new collection, run 'gs3-mkcol.sh/bat <sitename> <collname>'
117Put 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>'
118Rename 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.
119
120See the manual for more details about both styles of collection building.
121
122Other Notes:
123---------------
124
125See gsdl3/docs/manual/manual.pdf for more details about the software and installation etc.
126
127Under Linux, Tomcat logs output in gsdl3/comms/jakarta/tomcat/logs/catalina.out.
128
129To 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.
130
131ant can't seem to do cvs using authenticated cvs on windows:
132there were some classes missing - www.ibiblio.org/maven/jsch/jars/jsch-0.1.17.jar
133many ssh processes seemed to be started up - all waiting in the background for password??
134So should only use anonymous cvs.
135
136Using External Tomcat:
137------------------------
138
139If you want to use an existing Tomcat, set the path to its base directory
140in build.properties (tomcat.installed.path). 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.
141
142 You will need to modify the Tomcat setup slightly.
143
1441. Tell Tomcat about the Greenstone web app. There are two ways to do this.
145
146A. Add in the Greenstone context to Tomcat's server.xml.
147
148<Context path="/gsdl3" docBase="path-to-gsdl3/web" debug="1"
149reloadable="true"><Resources allowLinking='true'/></Context>
150
151B. Alternatively, you can move (and rename) the gsdl3/web directory to tomcat/webapps/gsdl3 (i.e. the resulting directories will be like
152tomcat/webapps/gsdl3/WEB-INF, no web directory). This should be done after running the initial 'ant prepare install'.
153You will need to set the web.home property in the build.properties file
154i.e.
155web.home=${tomcat.installed.path}/webapps/gsdl3
156And then run 'ant configure' to reset gsdl3home.
157
1582. Set up the JNI libraries and Java wrappers.
159JNI 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.
160The wrappers need to be loaded by this too.
161To 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).
162
163These JNI bits are located by default in the lib/jni directory. There are two ways to get them into Tomcat:
164A: Keep all the Greenstone stuff inside the gsdl3 directory, and just modify the environment that Tomcat runs in
165
166Set LD_LIBRARY_PATH (linux) or PATH (windows) to include the gsdl3/lib/jni directory.
167Add all the jar files in gsdl3/lib/jni directory to the CLASSPATH, then edit tomcats setclasspath.sh/bat to use the system CLASSPATH.
168(in setclasspath.bat, change
169set CLASSPATH=%JAVA_HOME%\lib\tools.jar
170to
171set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH%
172
173in setclasspath.sh, change
174# Set standard CLASSPATH
175if [ "$1" = "debug" -o "$1" = "javac" ] ; then
176 CLASSPATH="$JAVA_HOME"/lib/tools.jar
177fi
178
179to
180# Set standard CLASSPATH
181if [ "$1" = "debug" -o "$1" = "javac" ] ; then
182 CLASSPATH="$JAVA_HOME"/lib/tools.jar:"CLASSPATH"
183fi
184
185
186B: Copy the files into Tomcat installation:
187Move the gsdl3/lib/jni jar files into tomcat's shared/lib directory.
188Move 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.
189This has the advantage that you can use this for other webapps without modifying the Tomcat environment.
190
191
192Once all these changes have been made, you will need to restart the Tomcat server for them to take effect.
193
194
195
196
Note: See TracBrowser for help on using the repository browser.