Changeset 8472


Ignore:
Timestamp:
2004-11-05T15:30:24+13:00 (19 years ago)
Author:
kjdon
Message:

more changes, and added a table of contents

Location:
trunk/gsdl3/docs/manual
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/docs/manual/manual.tex

    r7861 r8472  
    5959
    6060This 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
    6163\newpage
    6264\section{\gs\  installation and administration}\label{sec:install}
     
    402404\begin{gsc}\begin{verbatim}
    403405<?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">
    405408<DirectoryMetadata>
    406409  <FileSet>
     
    21352138\section{Distributed \gs\ }\label{sec:distributed}
    21362139
    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 implemented a 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.
    21382141
    21392142more explanation..
     
    21462149\end{figure}
    21472150
    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}.
     2151We 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}.
    21502152
    21512153\subsection{Serving a site using soap}
     
    21902192If 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.
    21912193
    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:
     2194The 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
     2196To install Greenstone once you have checked it out of CVS, do the following (alternatives for Linux or Windows):
    21972197
    21982198\begin{quote}\begin{gsc}
    21992199cd 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\\
     2201source gs3-setup.sh or gs3-setup
    22082202\end{gsc}\end{quote}
    22092203
    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:
     2204To recompile the code at any stage, you can use
    22132205\begin{quote}\begin{gsc}
    2214 ./gs3-launch.sh
    2215 ./gs3-launch.sh -shutdown
     2206source gs3-setup.sh or gs3-setup\\
     2207make\\
     2208make install\\
    22162209\end{gsc}\end{quote}
    22172210
    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 
     2211Note: \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
     2213To startup or shutdown the library (includes the Tomcat server and MYSQL server), the commands are (run from the gsdl3 directory):
    22272214\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
    22312217\end{gsc}\end{quote}
    22322218
    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.
    22432219
    22442220\newpage
     
    22512227
    22522228
    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:\\
     2229Tomcat 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
     2235Note: Tomcat must be shutdown and restarted any time you make changes in the following for those changes to take effect:
    22562236\begin{bulletedlist}
    22572237\begin{gsc}
     
    22662246On 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.
    22672247
    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}:\\
     2248We 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}:
    22692249
    22702250\begin{quote}\begin{gsc}
     
    22752255\end{gsc}\end{quote}
    22762256
    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):
     2257We 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}):
    22782258
    22792259In the default servlet definition, change the 'listings' parameter to true.
    22802260
    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.
     2261Tomcat 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.
    22822264
    22832265\subsection{Proxying Tomcat with apache}
     
    22942276\end{gsc}\end{quote}
    22952277
    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.
     2278In 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.
    22972281
    22982282\subsection{Running Tomcat behind a proxy}
     
    23032287\section{SOAP}\label{app:soap}
    23042288
    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:
     2289Grenstone 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:
    23082290
    23092291\begin{quote}\begin{gsc}
    2310 install-soap.bash 
     2292gs3-enable-soap.[sh/bat]
    23112293\end{gsc}\end{quote}
    23122294
    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:
     2295All this does is to rename the SOAP web.xml.disabled file to web.xml.
     2296
     2297The 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
     2299To deploy a SOAP service for other sites, run
     2300\begin{quote}\begin{gsc}
     2301gs3-soap-deploy-site.[sh/bat] <sitename> <siteURI>
     2302\end{gsc}\end{quote}
     2303
     2304This 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:
    23152305
    23162306\begin{gsc}\begin{verbatim}
    23172307java org.apache.soap.server.ServiceManagerClient
    23182308  http://localhost:8080/soap/servlet/rpcrouter deploy
    2319   resources/soap/localsite.xml
     2309  resources/soap/<sitename>.xml
    23202310\end{verbatim}\end{gsc}
    23212311
    2322 You can also deploy a service through the website.  If Tomcat is not running, start it up (see \ref{subsec:runtomcat}).
     2312You can also deploy a service through the website.  If Tomcat is not running, start it up.
    23232313
    23242314The 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.
    23252315
    2326 To deploy the SOAPServer for localsite:
     2316To deploy the SOAPServer for siteX:
    23272317
    23282318Click on ``deploy'' and edit the following fields in the deploy form:
    23292319
    23302320\begin{tabular}{ll}
    2331 ID: & org.greenstone.localsite\\
     2321ID: & <URI for siteX>\\
    23322322Scope: (choose Session  & Request---new instantiation for each request\\
    23332323  or Application)   &    Session---same instantiation across a session\\
    23342324        &    Application---only uses one instantiation\\
    23352325Methods: &process\\
    2336 Java Provider / Provider Class: & org.greenstone.gsdl3.SOAPServer\\
     2326Java Provider / Provider Class: & org.greenstone.gsdl3.SOAPServersiteX\\
    23372327\end{tabular}
    23382328
    23392329Now 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.
    23402330
    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.
     2331Information about deployed services is maintained between Tomcat sessions---you only need to deploy it once.
    23422332
    23432333\subsection{Debugging SOAP}\label{app:soap-debug}
Note: See TracChangeset for help on using the changeset viewer.