source: trunk/gsdl3/INSTALL@ 3832

Last change on this file since 3832 was 3706, checked in by kjdon, 21 years ago

modified

  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1INSTALLATION GUIDE FOR GSDL3
2
3This stuff is all done by a script now:
4need to carry out the following:
5
6source setup.bash
7install.bash
8source setup.bash
9
10Note: the second setup.bash is needed to add the newly created jar files to the CLASSPATH
11
12if you want to use soap, also run
13install-soap.bash
14you shouldn't run this more than once.
15
16You should now be able to run greenstone - go to localhost:8080/gsdl3, and 'run the library servlet'.
17
18Do not run install.bash more than once. If you need to update your stuff from cvs, or recompile things etc, you can run update.bash.
19
20Some notes for subsequent running of gsdl3:
21
22TOMCAT:
23
24Tomcat is a servlet container. It is used to serve a greenstone site using a servlet.
25
26The file web/WEB-INF/web.xml contains the setup information for tomcat---tells it what servlets to load, what initial paramaters to pass them, and what web names map to the servlets.
27There are three servlets specified in web.xml: one is a test servlet that just prints ``hello greenstone'' to a web page. This is useful if you are having trouble getting tomcat set up. The other two are greenstone library servlets, ``library'', which serves localsite, and ``library1'' which serves site1.
28
29To run tomcat, you need to have sourced setup.bash in $GSDL3HOME to set up $CLASSPATH. Then,
30
31cd \gsdlhome/comms/tomcat/jakarta-tomcat-4.0.1/bin
32./startup.sh
33
34./shutdown.sh shuts down tomcat
35
36The tomcat server can be accessed on the web at http://localhost:8080---this gets you to a welcome page.
37The greenstone stuff is at http://localhost:8080/gsdl3---this displays $GSDL3HOME/web/index.html. You should be able to run the test servlet and both library servlets from this page.
38
39Note: tomcat must be shutdown and restarted any time you make changes in the following for those changes to take effect:
40web/WEB-INF/web.xml
41comms/tomcat/jakarta-tomcat-4.0.1/conf/server.xml
42any classes or jar files used by the servlets
43
44Note: stdin and stdout for the servlets both go to comms/tomcat/jakarta/logs/catalina.out
45
46SITES:
47There are two greenstone "sites" that come with the checkout: localsite, and site1. localsite has several collections, only two of which have any actual data. The third is a dummy collection. site1 has one dummy collection. Each site has a configuration file which specifies the site name, site-wide services if any, and a list of remote sites to connect to.
48localsite does not connect to any other sites. site1 specifies a SOAP connection to localsite.
49
50The collections which do not have data can be looked at but you cant do any queries on them.
51
52SOAP:
53
54site1 specifies a SOAP connection to localsite. If you run site1 without connecting to localsite, you can only see the local collections, eg the dummy collection myfiles. However, if you connect to localsite, you can see all of its collections as well.
55
56The SOAP server we use is actually run as a servlet in tomcat. The install-soap.bash script sets up SOAP, sets up the SOAP server class which will be your service, and then deploys that service.
57
58You can also deploy services through the web interface.
59The SOAP servlet can be accessed at http://localhost:8080/soap. You should see a welcome page. Click on ``Run the admin client''. This enables you to list, deploy and undeploy SOAP services.
60
61To deploy the SOAPServer for localsite:
62
63Click on ``deploy'' and edit the following fields in the deploy form:
64
65
66ID: org.greenstone.localsite
67Scope: (any will do) Request---new instantiation for each reques
68 Session---same instantiation across a session
69 Application---only uses one instantiation
70Methods: process
71Java Provider / Provider Class: org.greenstone.gsdl3.SOAPServer
72
73
74Now click the ``deploy'' button at the bottom of the page. If the service has been deployed, it should appear when you click on the lefthand ``List'' button.
75
76Information about deployed services is maintained between tomcat sessions---you only need to deploy it once. To get the library1 servlet talking to the SOAP server, you need to shutdown and restart tomcat (see above). You should see more collections when you run the library1 servlet.
77
78Debugging SOAP
79
80If you need to debug the SOAP stuff for some reason, or just want to look at the SOAP messages that are being passed back and forth, there is a program called TcpTunnelGui. This intercepts messages coming in to one port, displays them, and passes them to another port.
81
82To run it:
83
84java org.apache.soap.util.net.TcpTunnelGui 8070 localhost 8080
85
86tomcat uses port 8080 - you need to modify greenstone to talk to port 8070 instead of 8080. - this is specified in the 'site' element of the site configuration file.
87
88eg, in sites/site1/siteConfig.xml:
89
90<site name="org.greenstone.localsite"
91 address="http://localhost:8080/soap/servlet/rpcrouter"
92 type="soap"/>
93
94You can replace the 8080 with 8070 if you want to run TcpTunnelGui.
95
96Note that http://localhost:8080/soap/servlet/rpcrouter is the
97address for talking to the tomcat SOAP servlet services.
98
99Note: you can change tomcat to use a different port if you like. Edit comms/tomcat/jakarta/conf/server.xml, and change 8080 to whatever. If you do this, and are using soap, you need to remember to change the port number in:
100
101the install-soap.bash file where it tries to deploy site1.
102the siteConfig.xml file for any site that wants to talk to a soap service running on this tomcat.
103
Note: See TracBrowser for help on using the repository browser.