source: trunk/gsdl3/INSTALL@ 4828

Last change on this file since 4828 was 4264, checked in by kjdon, 21 years ago

added another hint

  • Property svn:keywords set to Author Date Id Revision
File size: 5.4 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: if you are using mozilla it doesn't seem to like localhost - you should edit the siteConfig files (web/sites/localsite/siteConfig.xml) to have your computer name instead of localhost.
11
12Note: the second setup.bash is needed to add the newly created jar files to the CLASSPATH
13
14if you want to use soap, also run
15install-soap.bash
16you shouldn't run this more than once.
17
18You should now be able to run greenstone - go to localhost:8080/gsdl3, and 'run the library servlet'.
19
20Do 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.
21
22Some notes for subsequent running of gsdl3:
23
24TOMCAT:
25
26Tomcat is a servlet container. It is used to serve a greenstone site using a servlet.
27
28The 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.
29There 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.
30
31To run tomcat, you need to have sourced setup.bash in $GSDL3HOME to set up $CLASSPATH. Then,
32
33cd \gsdlhome/comms/tomcat/jakarta-tomcat-4.0.1/bin
34./startup.sh
35
36./shutdown.sh shuts down tomcat
37
38The tomcat server can be accessed on the web at http://localhost:8080---this gets you to a welcome page.
39The 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.
40
41Note: tomcat must be shutdown and restarted any time you make changes in the following for those changes to take effect:
42web/WEB-INF/web.xml
43comms/tomcat/jakarta-tomcat-4.0.1/conf/server.xml
44any classes or jar files used by the servlets
45
46Note: stdin and stdout for the servlets both go to comms/tomcat/jakarta/logs/catalina.out
47
48SITES:
49There 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.
50localsite does not connect to any other sites. site1 specifies a SOAP connection to localsite.
51
52The collections which do not have data can be looked at but you cant do any queries on them.
53
54SOAP:
55
56site1 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.
57
58The 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.
59
60You can also deploy services through the web interface.
61The 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.
62
63To deploy the SOAPServer for localsite:
64
65Click on ``deploy'' and edit the following fields in the deploy form:
66
67
68ID: org.greenstone.localsite
69Scope: (any will do) Request---new instantiation for each reques
70 Session---same instantiation across a session
71 Application---only uses one instantiation
72Methods: process
73Java Provider / Provider Class: org.greenstone.gsdl3.SOAPServer
74
75
76Now 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.
77
78Information 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.
79
80Debugging SOAP
81
82If 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.
83
84To run it:
85
86java org.apache.soap.util.net.TcpTunnelGui 8070 localhost 8080
87
88tomcat 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.
89
90eg, in sites/site1/siteConfig.xml:
91
92<site name="org.greenstone.localsite"
93 address="http://localhost:8080/soap/servlet/rpcrouter"
94 type="soap"/>
95
96You can replace the 8080 with 8070 if you want to run TcpTunnelGui.
97
98Note that http://localhost:8080/soap/servlet/rpcrouter is the
99address for talking to the tomcat SOAP servlet services.
100
101Note: 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:
102
103the install-soap.bash file where it tries to deploy site1.
104the siteConfig.xml file for any site that wants to talk to a soap service running on this tomcat.
105
Note: See TracBrowser for help on using the repository browser.