1 | INSTALLATION GUIDE FOR GSDL3
|
---|
2 |
|
---|
3 | 1. you also need to get mgpp code - comes in a separate checkout.
|
---|
4 | I once added a directory for mgpp into gsdl3/packages in cvs - now I cant get
|
---|
5 | rid of it, so you need to delete it before you start.
|
---|
6 | cd packages
|
---|
7 | rm -r mgpp
|
---|
8 | cvs co mgpp
|
---|
9 | cd mgpp
|
---|
10 | ./configure --prefix <gsdl3home>
|
---|
11 | make
|
---|
12 | make install
|
---|
13 | cd ../..
|
---|
14 |
|
---|
15 | Note: you need to use your gsdl3 home directory as the prefix for configure
|
---|
16 | at this stage - mgpp has been set up properly, but gsdl3 hasn't
|
---|
17 |
|
---|
18 |
|
---|
19 | 2. Make the gsdl3 stuff
|
---|
20 |
|
---|
21 | First need to unpack the tomcat stuff, cos we use a jar file from there
|
---|
22 |
|
---|
23 | cd comms/tomcat/
|
---|
24 |
|
---|
25 | tar xzvf jakarta-tomcat-4.0.1.tar.gz
|
---|
26 |
|
---|
27 | cd ../..
|
---|
28 |
|
---|
29 | source setup.bash - to set up your CLASSPATH
|
---|
30 |
|
---|
31 | do a 'make', then 'make install', in each of the following directories
|
---|
32 |
|
---|
33 | src/java/org/greenstone/gdbm
|
---|
34 | src/java/org/greenstone/testing
|
---|
35 | src/java/org/greenstone/gsdl3
|
---|
36 | src/java/org/greenstone/applet/phind
|
---|
37 |
|
---|
38 | 3. set up the sample mgpp collection
|
---|
39 |
|
---|
40 | in sites/localsite/collect/mgppdemo/index/
|
---|
41 |
|
---|
42 | tar xzvf mgpp-indexfiles.tar.gz
|
---|
43 |
|
---|
44 | this is a collection built using mgpp in greenstone 2 - MGPPGDBMService works
|
---|
45 | with this type of collection.
|
---|
46 |
|
---|
47 | Note, you can use the new Java Queryer program to query this collection (see
|
---|
48 | RUNNING)
|
---|
49 |
|
---|
50 |
|
---|
51 | 4. set up the servlet information for tomcat
|
---|
52 |
|
---|
53 | edit web/WEB-INF/web.xml
|
---|
54 |
|
---|
55 | in the init-param entries for the servlet, you need to change the siteshome
|
---|
56 | and interfaces home params to reflect your installation setup. - should point to the sites and interfaces directories.
|
---|
57 |
|
---|
58 | in web, add symbolic links to your interfaces, sites and lib directories
|
---|
59 |
|
---|
60 | is likely to be:
|
---|
61 | ln -s ../interfaces
|
---|
62 | ln -s ../sites
|
---|
63 | ln -s ../lib
|
---|
64 |
|
---|
65 | 5. set up tomcat
|
---|
66 |
|
---|
67 | cd comms/tomcat/jakarta-tomcat-4.0.1
|
---|
68 |
|
---|
69 | edit bin/catalina.sh:
|
---|
70 |
|
---|
71 | on line 89 add $CLASSPATH to the CP="...." line ie. CP="$CLASSPATH:..." - this
|
---|
72 | sets up the class path properly
|
---|
73 |
|
---|
74 | edit conf/server.xml:
|
---|
75 |
|
---|
76 | you need add a context for gsdl servlets
|
---|
77 | add these lines (putting the correct path for GSDL3HOME)
|
---|
78 |
|
---|
79 | <!-- GSDL3 Service -->
|
---|
80 | <Context path="/gsdl3" docBase="<GSDL3HOME>/web" debug="1" reloadable="true"/>
|
---|
81 |
|
---|
82 | when you edit server.xml, (or change web.xml in gsdl3/web/WEB-INF/web.xml) or
|
---|
83 | change the classes, you need to shutdown and restart the server. also you may
|
---|
84 | need to clear the cache of your browser
|
---|
85 |
|
---|
86 | (conf/server.xml is the place to change the port number if needed)
|
---|
87 |
|
---|
88 |
|
---|
89 | 6. run tomcat
|
---|
90 |
|
---|
91 | to run tomcat, you need to have sourced setup.bash in GSDL3HOME to set up $CLASSPATH
|
---|
92 |
|
---|
93 | then cd to comms/tomcat/jakarta-tomcat-4.0.1/bin
|
---|
94 |
|
---|
95 | run ./startup.sh
|
---|
96 |
|
---|
97 | (to shut down tomcat, run ./shutdown.sh)
|
---|
98 |
|
---|
99 | the tomcat server can be accessed on the web via localhost:8080
|
---|
100 |
|
---|
101 | the greenstone stuff is at localhost:8080/gsdl3 - this uses index.html - has
|
---|
102 | links to the test servlet and the greenstone servlets
|
---|
103 |
|
---|
104 | you should be able to run library from the index page
|
---|
105 |
|
---|
106 | System.out/err and cout/cerr go to comms/tomcat/jakarta-tomcat-4.0.1/logs/catalina.out - if need to debug stuff
|
---|
107 |
|
---|
108 | 7. The test servlet
|
---|
109 |
|
---|
110 | a test servlet is provided to make sure you have tomcat set up properly
|
---|
111 |
|
---|
112 | in web/WEB-INF/classes, do 'javac TestServlet.java'
|
---|
113 |
|
---|
114 | you can click on the link on the gsdl3 index page to run the test.
|
---|
115 | or can specify it directly:
|
---|
116 | localhost:8080/gsdl3/testing
|
---|
117 |
|
---|
118 | the path 'testing' is determined by servlet-mapping entry in
|
---|
119 | web/WEB-INF/web.xml
|
---|
120 |
|
---|
121 |
|
---|
122 |
|
---|
123 | USING SOAP TO TALK TO A REMOTE SITE
|
---|
124 |
|
---|
125 | this is needed if you have a setup such as for site1 - it uses a SOAP
|
---|
126 | connection to site2.
|
---|
127 |
|
---|
128 | 1. set up SOAP
|
---|
129 |
|
---|
130 | untar soap-bin-2.2.tar.gz in the comms/soap directory
|
---|
131 |
|
---|
132 | edit comms/tomcat/jakarta-tomcat-4.0.1/conf/server.xml
|
---|
133 |
|
---|
134 | add the following (put proper path for <GSDL3HOME>)
|
---|
135 |
|
---|
136 | <!-- SOAP Service -->
|
---|
137 | <Context path="/soap" docBase="<GSDL3HOME>/comms/soap/soap-2_2/webapps/soap" debug="1" reloadable="true"/>
|
---|
138 |
|
---|
139 |
|
---|
140 | 2. set up SOAP Server:
|
---|
141 |
|
---|
142 | the class SOAPServer is a wrapper around a messagerouter - so can serve
|
---|
143 | the collections
|
---|
144 |
|
---|
145 | it has a path hard coded in - need to set this to your appropriate site -
|
---|
146 | for the example sites that I've set up, it should be <GSDL3HOME>/sites/site2
|
---|
147 |
|
---|
148 | 3. deploy your service - SOAPServer
|
---|
149 |
|
---|
150 | you can access the soap service though the web, at http://localhost:8080/soap
|
---|
151 |
|
---|
152 | Run the admin client
|
---|
153 |
|
---|
154 | can list, deploy, undeploy soap services
|
---|
155 |
|
---|
156 | to deploy the SOAPServer for site2:
|
---|
157 |
|
---|
158 | edit the following fields in the deploy form:
|
---|
159 |
|
---|
160 | ID: org.greenstone.site2
|
---|
161 | Scope: any will do: Request - new instantiation for each request
|
---|
162 | Session - same instantiation across a session
|
---|
163 | Application - only uses one instantiation
|
---|
164 |
|
---|
165 | Methods: process
|
---|
166 |
|
---|
167 | Java Provider / Provider Class: org.greenstone.gsdl3.SOAPServer
|
---|
168 |
|
---|
169 | then click deploy.
|
---|
170 | hopefully all will be well.
|
---|
171 |
|
---|
172 | 4. debugging soap:
|
---|
173 |
|
---|
174 | tomcat output goes to jakarta-tomcat-4.0.1/logs/catalina.out
|
---|
175 |
|
---|
176 | if you recompile the classes, you need to shutdown and restart tomcat to get
|
---|
177 | the new classes.
|
---|
178 |
|
---|
179 | deployment info is retained between shutdown and start up - dont need to
|
---|
180 | redeploy it each time.
|
---|
181 |
|
---|
182 | TcpTUnnelGui:
|
---|
183 |
|
---|
184 | this program allows you to view the actual soap messages
|
---|
185 |
|
---|
186 | run like:
|
---|
187 |
|
---|
188 | java org.apache.soap.util.net.TcpTunnelGui 8070 localhost 8080
|
---|
189 |
|
---|
190 | tomcat uses 8080, and you need to modify the greenstone stuff to talk to port
|
---|
191 | 8070 instead of 8080:
|
---|
192 |
|
---|
193 | sites/site1 is the site that talks to the SOAPServer for site2
|
---|
194 |
|
---|
195 | in site1/sitecfg.xml, in the address field, replace 8080 with 8070 when you
|
---|
196 | want to use TcpTunnelGui.
|
---|
197 |
|
---|
198 | note that
|
---|
199 | http://localhost:8080/soap/servlet/rpcrouter
|
---|
200 |
|
---|
201 | is the address for talking to the tomcat soap thingy.
|
---|
202 |
|
---|
203 |
|
---|