Changeset 8472
- Timestamp:
- 2004-11-05T15:30:24+13:00 (19 years ago)
- Location:
- trunk/gsdl3/docs/manual
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/docs/manual/manual.tex
r7861 r8472 59 59 60 60 This documentation consists of several parts. Section~\ref{sec:install} is for administrators, and covers \gsiii\ installation, how to access the library, and some administration issues. Section~\ref{sec:user} is for users of the software, and looks at using the sample collections, creating new collections, and how to make small customisations to the interface. The remaining sections are aimed towards the \gs\ developer. Section~\ref{sec:develop-runtime} describes the run-time system, including the structure of the software, and the message format, while Section~\ref{sec:develop-build} describes the collection building process. Section~\ref{sec:new-features} describes how to add new features to \gs, such as how to add new services, new page types, new plugins for different document formats. Section~\ref{sec:distributed} describes how to make \gs\ run in a distributed fashion, using SOAP as an example communications protocol. Finally, there are several appendices, including how to install \gs\ from CVS, some notes on Tomcat and SOAP, and a comparison of \gsii\ and \gsiii\ format statements. 61 \newpage 62 \tableofcontents 61 63 \newpage 62 64 \section{\gs\ installation and administration}\label{sec:install} … … 402 404 \begin{gsc}\begin{verbatim} 403 405 <?xml version="1.0" encoding="UTF-8"?> 404 <!DOCTYPE DirectoryMetadata SYSTEM "http://greenstone.org/dtd/DirectoryMetadata/1.0/DirectoryMetadata.dtd"> 406 <!DOCTYPE DirectoryMetadata SYSTEM "http://greenstone.org/dtd/DirectoryMetadata 407 /1.0/DirectoryMetadata.dtd"> 405 408 <DirectoryMetadata> 406 409 <FileSet> … … 2135 2138 \section{Distributed \gs\ }\label{sec:distributed} 2136 2139 2137 \gs\ is designed to run in a distributed fashion. One \gs\ installation can talk to several sites on different computers. This requires some sort of communication protocol. Any protocol can be used, however we have only implementeda simple SOAP protocol.2140 \gs\ is designed to run in a distributed fashion. One \gs\ installation can talk to several sites on different computers. This requires some sort of communication protocol. Any protocol can be used, currently we have a simple SOAP protocol. 2138 2141 2139 2142 more explanation.. … … 2146 2149 \end{figure} 2147 2150 2148 We have used Apache SOAP for Java. This is run as a servlet in Tomcat. 2149 If you have obtained \gs\ through CVS, you will need to install soap separately, describe in Appendix~\ref{app:soap-cvs}. Debugging soap is described in Appendix~\ref{app:soap-debug}. 2151 We have used Apache SOAP for Java. This is run as a servlet in Tomcat. Tomcat in Greenstone comes set up to use SOAP, but it is not enabled. To enable it, run \gst{gs3-enable-soap.sh/bat}. For more details about SOAP in Greenstone, see Appendix~\ref{app:soap}. Debugging soap is described in Appendix~\ref{app:soap-debug}. 2150 2152 2151 2153 \subsection{Serving a site using soap} … … 2190 2192 If you need it, the password for anonymous CVS access is \gst{anonymous}. Note that some older versions of CVS have trouble accessing this repository due to the port number being present. We are using version 1.11.1p1. 2191 2193 2192 The software needs to be compiled and installed. The installation procedure has been semi-automated. The following sections describe installation under Linux and windows. The most up to date instructions may be found in the README.txt file in the top level gsdl3 directory. 2193 2194 \subsection{Linux install} 2195 2196 What you need to do is: 2194 The software needs to be compiled and installed. The installation procedure uses a shell script or batch file. The most up to date instructions may be found in the README.txt file in the top level gsdl3 directory. 2195 2196 To install Greenstone once you have checked it out of CVS, do the following (alternatives for Linux or Windows): 2197 2197 2198 2198 \begin{quote}\begin{gsc} 2199 2199 cd gsdl3\\ 2200 source gs3-setup.sh\\ 2201 ./gs3-prepare.sh\\ 2202 ./configure \\ 2203 make \\ 2204 make install \\ 2205 \[make docs\] \\ 2206 ./gs3-finalise.sh\\ 2207 source gs3-setup.sh \\ 2200 ./gs3-install.sh or gs3-install\\ 2201 source gs3-setup.sh or gs3-setup 2208 2202 \end{gsc}\end{quote} 2209 2203 2210 Note: \gst{source gs3-setup.sh} sets the environment variables \gst{CLASSPATH, PATH, JAVA\_HOME} and needs to be done in a shell before doing collection building etc. 2211 2212 To startup or shutdown the library (includes the Tomcat server and MYSQL server), the commands are: 2204 To recompile the code at any stage, you can use 2213 2205 \begin{quote}\begin{gsc} 2214 ./gs3-launch.sh 2215 ./gs3-launch.sh -shutdown 2206 source gs3-setup.sh or gs3-setup\\ 2207 make\\ 2208 make install\\ 2216 2209 \end{gsc}\end{quote} 2217 2210 2218 \subsection{Windows install} 2219 2220 [TODO: check that these are correct] 2221 Make sure that the following environment variables are set: JAVA\_HOME (where the JAva 2 SDK is installed); PATH (should include the CVS program, and \%JAVA\_HOME\%$\backslash$bin). The following commands should be run in a DOS prompt. 2222 2223 Run gs3-setup.bat\\ 2224 Run gs3-prepare.bat\\ 2225 Using Wordpad, edit the gsdl3$\backslash$comms$\backslash$jakarta$\backslash$tomcat$\backslash$conf$\backslash$server.xml file. Add 2226 2211 Note: \gst{gs3-setup} sets the environment variables \gst{CLASSPATH, PATH, JAVA\_HOME} and needs to be done in a shell before doing collection building etc. 2212 2213 To startup or shutdown the library (includes the Tomcat server and MYSQL server), the commands are (run from the gsdl3 directory): 2227 2214 \begin{quote}\begin{gsc} 2228 <!-- GSDL3 Service -->\\ 2229 <Context path='/gsdl3' docBase='@gsdl3home@$\backslash$web' debug='1' 2230 reloadable='true'/> 2215 ./gs3-launch.sh or gs3-launch 2216 ./gs3-launch.sh -shutdown or close the window 2231 2217 \end{gsc}\end{quote} 2232 2218 2233 above the line:2234 \gst{<!-- Tomcat Root Context -->}2235 2236 Still using Wordpad, edit the gsdl3$\backslash$comms$\backslash$jakarta$\backslash$tomcat$\backslash$conf$\backslash$web.xml file. set the value of the 'listings' parameter to false.2237 2238 Run make.bat\\2239 Run make.bat install.\\2240 Run gs3-finalise.bat\\2241 2242 To run \gs\ , run gs3-launch.bat. This will start the Tomcat server in a new DOS window (stop it by closing the window), and open a broser window showing the \gsiii\ homepage.2243 2219 2244 2220 \newpage … … 2251 2227 2252 2228 2253 Tomcat runs by default on port 8080---this can be changed in server.xml, in the \gst{<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --><Connector>} element. The siteConfig files also need changing if Tomcat's port is changed: \gst{<httpAddress>} for the site, and \gst{<address>} for a remote site both use this. 2254 2255 Note: Tomcat must be shutdown and restarted any time you make changes in the following for those changes to take effect:\\ 2229 Tomcat runs by default on port 8080---this can be changed in server.xml, in the \begin{quote}\begin{gsc} 2230 <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->\\ 2231 <Connector> 2232 \end{gsc}\end{quote} 2233 element. The siteConfig files also need changing if Tomcat's port is changed: \gst{<httpAddress>} for the site, and \gst{<address>} for a remote site both use this. 2234 2235 Note: Tomcat must be shutdown and restarted any time you make changes in the following for those changes to take effect: 2256 2236 \begin{bulletedlist} 2257 2237 \begin{gsc} … … 2266 2246 On startup, the servlet loads in its collections and services. If the site or collection configuration files are changed, these changes will not take effect until the site/collection is reloaded. This can be done through the reconfiguration messages (see Section~\ref{sec:runtime-config}), or by restarting Tomcat. 2267 2247 2268 We have set up Tomcat to follow symlinks. To disable this feature, remove the \gst{<Resources>} element from the gsdl3 context in \ gst{\$GSDL3HOME/comms/jakarta/tomcat/conf/server.xml}:\\2248 We have set up Tomcat to follow symlinks. To disable this feature, remove the \gst{<Resources>} element from the gsdl3 context in \\\gst{\$GSDL3HOME/comms/jakarta/tomcat/conf/server.xml}: 2269 2249 2270 2250 \begin{quote}\begin{gsc} … … 2275 2255 \end{gsc}\end{quote} 2276 2256 2277 We have set up Tomcat to disallow directory listings for everything in the docBase directory. To turn this back on, you need to edit Tomcat's default web.xml file (\ $GSDL3HOME/comms/jakarta/tomcat/conf/web.xml):2257 We have set up Tomcat to disallow directory listings for everything in the docBase directory. To turn this back on, you need to edit Tomcat's default web.xml file (\gst{\$GSDL3HOME/comms/jakarta/tomcat/conf/web.xml}): 2278 2258 2279 2259 In the default servlet definition, change the 'listings' parameter to true. 2280 2260 2281 Tomcat uses a Manager to handle HTTP session information. This may be stored between restarts if possible. To use a persistent session handling manager, uncomment the \gst{<Manager>} element in \gst{\$GSDL3HOME/comms/jakarta/tomcat/conf/server.xml}. For the default manager, session information is stored in the work directory: \gst{\$GSDL3HOME/comms/jakarta/tomcat/work/Standalone/localhost/gsdl3/SESSIONS.ser}. Delete this file to clear the cached session info. 2261 Tomcat uses a Manager to handle HTTP session information. This may be stored between restarts if possible. To use a persistent session handling manager, uncomment the \gst{<Manager>} element in \\ 2262 \gst{\$GSDL3HOME/comms/jakarta/tomcat/conf/server.xml}. For the default manager, session information is stored in the work directory:\\ 2263 \gst{\$GSDL3HOME/comms/jakarta/tomcat/work/Standalone/localhost/gsdl3/SESSIONS.ser}. Delete this file to clear the cached session info. 2282 2264 2283 2265 \subsection{Proxying Tomcat with apache} … … 2294 2276 \end{gsc}\end{quote} 2295 2277 2296 In our example, the \gsiii\ servlet can be accessed at \gst{http://www.greenstone.org/greenstone3/library}, instead of at \gst{http://puka.cs.waikato.ac.nz:8080/gsdl3/library}, which is not publically accessible. 2278 In our example, the \gsiii\ servlet can be accessed at \\ 2279 \gst{http://www.greenstone.org/greenstone3/library}, instead of at \\ 2280 \gst{http://puka.cs.waikato.ac.nz:8080/gsdl3/library}, which is not publically accessible. 2297 2281 2298 2282 \subsection{Running Tomcat behind a proxy} … … 2303 2287 \section{SOAP}\label{app:soap} 2304 2288 2305 \subsection{Setting up SOAP from CVS}\label{app:soap-cvs} 2306 2307 If you have obtained \gs\ through CVS, you will need to install the SOAP stuff by running: 2289 Grenstone uses Apache SOAP for distributed communications. This runs as a servlet inside Tomcat, and services can be deployed by the servlet. The SOAP servlet comes ready to run, but not enabled. To enable it, run: 2308 2290 2309 2291 \begin{quote}\begin{gsc} 2310 install-soap.bash 2292 gs3-enable-soap.[sh/bat] 2311 2293 \end{gsc}\end{quote} 2312 2294 2313 This unpacks the soap distribution, adds a SOAP context to Tomcat's server.xml configuration file, and creates the file \gst{src/java/org/greenstone/gsdl3/SOAPServer.java} from \gst{src/java/org/greenstone/gsdl3/SOAPServer.java.in} (it has a place where gsdl3home needs to be added). 2314 It also tries to deploy the SOAP service, but this often doesn't work. You may need to run from a shell the following command: 2295 All this does is to rename the SOAP web.xml.disabled file to web.xml. 2296 2297 The SOAP service for localsite comes pre-deployed. To get the gateway servlet talking to the localsite SOAP server, you need to shutdown and restart Tomcat. You should now see more collections when you run the gateway servlet. 2298 2299 To deploy a SOAP service for other sites, run 2300 \begin{quote}\begin{gsc} 2301 gs3-soap-deploy-site.[sh/bat] <sitename> <siteURI> 2302 \end{gsc}\end{quote} 2303 2304 This creates a new SOAPServer class for the site (\gst{\$GSDL3HOME/src/java/org/greenstone/gsdl3/SOAPServer<sitename>.java}), creates a resource file for deployment (\gst{\$GSDL3HOME/resources/soap/<sitename>.xml}), and then tries to deploy the service. If the deployment doesn't work, you can run it from the command line like: 2315 2305 2316 2306 \begin{gsc}\begin{verbatim} 2317 2307 java org.apache.soap.server.ServiceManagerClient 2318 2308 http://localhost:8080/soap/servlet/rpcrouter deploy 2319 resources/soap/ localsite.xml2309 resources/soap/<sitename>.xml 2320 2310 \end{verbatim}\end{gsc} 2321 2311 2322 You can also deploy a service through the website. If Tomcat is not running, start it up (see \ref{subsec:runtomcat}).2312 You can also deploy a service through the website. If Tomcat is not running, start it up. 2323 2313 2324 2314 The SOAP servlet can be accessed at \begin{gsc}{\tt http://localhost:8080/soap}\end{gsc}. You should see a welcome page. Click on ``Run the admin client''. This enables you to list, deploy and undeploy SOAP services. 2325 2315 2326 To deploy the SOAPServer for localsite:2316 To deploy the SOAPServer for siteX: 2327 2317 2328 2318 Click on ``deploy'' and edit the following fields in the deploy form: 2329 2319 2330 2320 \begin{tabular}{ll} 2331 ID: & org.greenstone.localsite\\2321 ID: & <URI for siteX>\\ 2332 2322 Scope: (choose Session & Request---new instantiation for each request\\ 2333 2323 or Application) & Session---same instantiation across a session\\ 2334 2324 & Application---only uses one instantiation\\ 2335 2325 Methods: &process\\ 2336 Java Provider / Provider Class: & org.greenstone.gsdl3.SOAPServer \\2326 Java Provider / Provider Class: & org.greenstone.gsdl3.SOAPServersiteX\\ 2337 2327 \end{tabular} 2338 2328 2339 2329 Now click the ``deploy'' button at the bottom of the page. If the service has been deployed, it should appear when you click on the left hand ``List'' button. 2340 2330 2341 Information about deployed services is maintained between Tomcat sessions---you only need to deploy it once. To get the gateway servlet talking to the SOAP server, you need to shutdown and restart Tomcat (see \ref{subsec:runtomcat}). You should see more collections when you run the gateway servlet.2331 Information about deployed services is maintained between Tomcat sessions---you only need to deploy it once. 2342 2332 2343 2333 \subsection{Debugging SOAP}\label{app:soap-debug}
Note:
See TracChangeset
for help on using the changeset viewer.