22
|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
2 <html>
|
|
3 <head>
|
108
|
4 <title>Installation of alcatraz/digilib</title>
|
22
|
5 </head>
|
|
6
|
|
7 <body>
|
|
8 <h1>What you need to install digilib</h1>
|
|
9
|
|
10 <ul>
|
163
|
11 <li><a href="http://java.sun.com/downloads/index.html" >Java JDK</a> >1.2 (preferred 1.4 and up)</li>
|
108
|
12
|
22
|
13 <li><a href="http://jakarta.apache.org/tomcat/index.html" >Jakarta
|
108
|
14 Tomcat</a> version 4 or later (preferred 4.1 and up) from
|
27
|
15 <a href="http://jakarta.apache.org<" >http://jakarta.apache.org</a></li>
|
108
|
16
|
22
|
17 <li>The digilib distribution packages (from
|
27
|
18 <a href="http://developer.berlios.de" >http://developer.berlios.de</a>)
|
22
|
19 <ul>
|
108
|
20 <li>alcatraz/digilib scripts and servlets package
|
|
21 <a href="http://download.berlios.de/digilib/alcatraz-core-0.3.zip"><code>alcatraz-core.zip</code></a></li>
|
163
|
22 <li>digilib configuration files for tomcat 4 package on Linux/Unix
|
|
23 <a href="http://download.berlios.de/digilib/digilib-tomconf-1.0.zip"><code>digilib-tomconf.zip</code></a> (Not essential)</li>
|
|
24 <li>digilib configuration files for tomcat 4 package on Windows
|
|
25 <a href="http://download.berlios.de/digilib/digilib-win-conf-1.0.zip"><code>digilib-win-conf.zip</code></a> (Not essential)</li>
|
22
|
26 </ul>
|
|
27 </li>
|
|
28 </ul>
|
|
29
|
|
30 <h1>Installation</h1>
|
|
31
|
163
|
32 <h2>On Linux/Unix</h2>
|
22
|
33
|
|
34 <ol>
|
108
|
35 <li>Make shure the Java JDK is installed (a JRE won't do).</li>
|
|
36
|
22
|
37 <li>Create a base directory for docuserver (the default used here is
|
|
38 <code>/docuserver</code>) and for the web interface
|
|
39 (<code>/docuserver/www</code>).</li>
|
108
|
40
|
|
41 <li>Unpack the <code>alcatraz-core</code> package in the web
|
22
|
42 interface directory (<code>/docuserver/www</code>). This will create
|
|
43 the digilib directory <code>digitallibrary</code>.</li>
|
108
|
44
|
|
45 <li>Unpack Jakarta Tomcat 4.1.24 in <code>/docuserver</code> This should
|
|
46 produce a directory <code>/docuserver/jakarta-tomcat-4.1.24</code>. Create a
|
|
47 link <code>/docuserver/tomcat</code> to the new directory.</li>
|
|
48
|
|
49 <li>(optional) Unpack the configuration files package
|
22
|
50 <code>digilib-tomconf</code> in the tomcat directory.</li>
|
108
|
51
|
|
52 <li>Create a link from the digilib directory into the Tomcat webapps
|
|
53 directory <code>/docuserver/tomcat/webapps</code> (type <code>ln -s
|
|
54 /docuserver/www/digitallibrary /docuserver/tomcat/webapps</code>) This is
|
|
55 the default installation running on port 8080 as
|
|
56 <code>http://myserver:8080/digitallibrary/</code>.</li>
|
|
57
|
22
|
58 <li>Adjust the path to the JDK and its options in
|
|
59 <code>catalina.sh</code> (in the directory
|
108
|
60 <code>/docuserver/tomcat/bin</code>, see below for details)</li>
|
|
61
|
22
|
62 <li>(optional) For SuSE Linux you can use the startup skript
|
|
63 <code>tomcat/bin/rctomcat</code>
|
|
64 to start and stop the tomcat server. Copy the script into
|
|
65 <code>/etc/init.d</code> as <code>tomcat</code> and set runlevel
|
|
66 links accordingly.</li>
|
108
|
67
|
22
|
68 <li>(optional) Set the tomcat directory and all files to be owned by
|
108
|
69 the user <code>wwwrun</code> (or whatever your webserver runs) and
|
|
70 use this account to start the tomcat server.</li>
|
|
71
|
112
|
72 <li>(optional) To use Mozilla-XUL functionality Alcatraz users have
|
|
73 to open the page
|
|
74 <code>http://myserver:8080/docuserver/digitallibrary/xul/install.html</code>
|
|
75 in a Mozilla compatible browser. There the users can find
|
|
76 instructions to install XUL-Components into their browser. </li>
|
108
|
77
|
22
|
78 </ol>
|
|
79
|
|
80
|
|
81 <!--
|
|
82 <h2>Apache connector module</h2>
|
|
83
|
|
84 <p>digilib currently needs to be accessed through the Apache
|
|
85 webserver. There are two possible connectors for Apache and Tomcat4:
|
|
86 <code>mod_webapp</code> and <code>mod_jk</code>. Only
|
|
87 <code>mod_webapp</code> has been tested so far.</p>
|
|
88
|
|
89 <ol>
|
|
90 <li>Get the sources for <code>mod_webapp</code></li>
|
|
91 </ol>
|
|
92 -->
|
|
93
|
163
|
94 <h2>On Windows (quick install)</h2>
|
|
95
|
|
96 <p>Set the following Environment Variables:<br />
|
|
97 <code>CATALINA_HOME = C:\jakarta-tomcat-4.1.24</code> (or similar)<br />
|
|
98 <code>JAVA_HOME = C:\j2sdk</code> (or similar)
|
|
99 </p>
|
|
100
|
|
101 <p>
|
|
102 Start Tomcat server: Open a console window (start <code>cmd.exe</code>).<br />
|
|
103 Type: <code>%CATALINA_HOME%\bin\startup</code>
|
|
104 </p>
|
|
105
|
|
106 <p>
|
|
107 Try the following URL in your browser:
|
|
108 <code>http://localhost:8080</code> or
|
|
109 <code>http://127.0.0.1:8080</code>
|
|
110 </p>
|
|
111
|
|
112 <p>
|
|
113 You should now be able to see the Tomcat opening screen: <em>If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!</em>
|
|
114 </p>
|
|
115
|
|
116 <p>
|
|
117 Shut it down again: In the console window type <code>%CATALINA_HOME%\bin\shutdown</code>.
|
|
118
|
|
119 <p>
|
|
120 Extract the "Alcatraz" distribution, possibly to <code>C:\docuserver</code>. Modify the following configuration files according to your paths (as in the "On Linux" section):
|
|
121 </p>
|
|
122
|
|
123 <p>For tomcat</p>
|
|
124 <ul>
|
|
125 <li><code>C:\jakarta-tomcat-4.1.24\conf\server.xml</code></li>
|
|
126 <li><code>C:\jakarta-tomcat-4.1.24\conf\tomcat-users.xml</code></li>
|
|
127 </ul>
|
|
128
|
|
129
|
|
130 <p>For digilib</p>
|
|
131 <ul>
|
|
132 <li><code>C:\docuserver\digitallibrary\WEB-INF\web.xml</code></li>
|
|
133 <li><code>C:\docuserver\digitallibrary\WEB-INF\digilib-config.xml</code></li>
|
|
134 <li><code>C:\docuserver\digitallibrary\WEB-INF\digilib-auth.xml</code></li>
|
|
135 </ul>
|
|
136
|
|
137 <p>In the <code>alcatraz-win-conf.zip</code> package you can find
|
|
138 prepared configuration files with the following default values:
|
|
139
|
|
140 <ul>
|
|
141 <li>The image file directory is <code>C:\bilder</code>. </li>
|
|
142 <li>The username for viewing image files is <code>digilib</code>.</li>
|
|
143 <li>The password for viewing image files is <code>digilib</code>.</li>
|
|
144 <li>The digilib server runs on Port <code>9090</code>.</li>
|
|
145 </ul>
|
|
146
|
|
147 <p>
|
|
148 Now you can restart the Tomcat server: <code>http://localhost:9090</code> or
|
|
149 <code>http://127.0.0.1:9090</code>.</p>
|
|
150
|
|
151 <p>
|
|
152 Watch the images:
|
|
153 <code>http://localhost:9090/docuserver/digitallibrary/digilib.jsp?&lv=2</code>
|
|
154 </p>
|
|
155
|
|
156
|
22
|
157 <h1>Configuration</h1>
|
|
158
|
|
159 <h2>Tomcat</h2>
|
|
160
|
163
|
161 <h3>catalina.sh / catalina.bat</h3>
|
22
|
162
|
108
|
163 <p>The file <code>catalina.sh</code> (in <code>/docuserver/tomcat/bin</code>
|
|
164 can be modified to provide the path to the JDK and runtime options
|
|
165 for the Java VM. Somewhere at the beginning of the file you can put two lines
|
22
|
166 like this:</p>
|
|
167
|
|
168 <pre>
|
112
|
169 export JAVA_HOME=/usr/local/lib/IBMJava2-14
|
22
|
170 export CATALINA_OPTS="-mx512m"
|
|
171 </pre>
|
|
172
|
163
|
173 <p>or, on Windows<p>
|
|
174
|
|
175 <pre>
|
|
176 set CATALINA_HOME=C:\jakarta-tomcat-4.1.24
|
|
177 set JAVA_HOME=C:\j2sdk
|
|
178 </pre>
|
|
179
|
22
|
180 <p>Adjust the <code>JAVA_HOME</code> path to point to your Java JDK
|
|
181 installation directory. You can adjust the memory used by the Java VM
|
112
|
182 with the <code>-mx</code> option.</p>
|
22
|
183
|
|
184 <p>You can delete those two lines if you set these variables in your
|
|
185 shell before starting tomcat in that same shell. These lines are
|
108
|
186 needed if you want to use the startup script mentioned above under
|
|
187 linux .</p>
|
22
|
188
|
|
189
|
|
190 <h3>tomcat-users.xml</h3>
|
|
191
|
|
192 <p>All passwords and usernames have to be set up in the file
|
108
|
193 <code>tomcat-users.xml</code> in <code>/docuserver/tomcat/conf</code> if you
|
22
|
194 want to use authentication in digilib. The file looks like this:</p>
|
|
195
|
|
196 <pre>
|
|
197 <tomcat-users>
|
|
198 <user name="tomcat" password="tomcat" roles="tomcat" />
|
|
199 <user name="role1" password="tomcat" roles="role1" />
|
|
200 <user name="both" password="tomcat" roles="tomcat,role1" />
|
|
201 </tomcat-users>
|
|
202 </pre>
|
|
203
|
|
204 <p>A user is identified by a <code>name</code> and
|
|
205 <code>password</code>. These two elements have to be entered in a
|
|
206 authentication form presented by the browser when accessing a
|
|
207 restricted resource. A user can have one or more
|
|
208 <code>roles</code>. These roles will be used by digilib to decide if
|
|
209 an authenticated user is allowed to access a document (see
|
|
210 <code>digilib-auth.xml</code> below).</p>
|
|
211
|
108
|
212 <p>If you want to use the webinterface to configure Tomcat, you have to
|
|
213 add administrational account with the roles <code>admin</code> and
|
|
214 <code>manager</code>.</p>
|
|
215
|
22
|
216 <p>tomcat has to be restarted before changes to
|
|
217 <code>tomcat-users.xml</code> have effect!</p>
|
|
218
|
108
|
219
|
22
|
220 <h2>Digilib</h2>
|
|
221
|
|
222 <h3>web.xml</h3>
|
|
223
|
|
224 <p>The deployment of the digilib servlets and JSPs is defined in the
|
|
225 file <code>web.xml</code> in the <code>WEB-INF</code> subdirectory of
|
|
226 the digilib directory
|
|
227 (<code>/docuserver/www/digitallibrary/WEB-INF</code>).</p>
|
|
228
|
108
|
229 <p>The only parameter you will have to adjust is the position of the
|
22
|
230 digilib configuration file. The parameter occurs twice in the file and
|
|
231 looks like this:</p>
|
|
232
|
|
233 <pre>
|
|
234 <!-- parameters to the servlet -->
|
|
235 <init-param>
|
|
236 <param-name>config-file</param-name>
|
|
237 <param-value>
|
|
238 <b>/docuserver/www/digitallibrary/WEB-INF/digilib-config.xml</b>
|
|
239 </param-value>
|
|
240 </init-param>
|
|
241 </pre>
|
|
242
|
108
|
243 <p>Change the path to point where you installed the configuration files.</p>
|
22
|
244
|
108
|
245 <p>Make shure to change the parameter in both places in the config
|
|
246 file! It is needed both for the servlet and the JSP pages!</p>
|
|
247
|
22
|
248
|
|
249 <h3>digilib-config.xml</h3>
|
|
250
|
|
251 <p>The main configuration for digilib is
|
|
252 <code>digilib-config.xml</code>. It's position is defined by the
|
|
253 <code>config-file</code> init-parameter to the servlets (see
|
|
254 above).</p>
|
|
255
|
|
256 <p>In the configuration file you can set several paths and
|
|
257 options. The file looks like this:</p>
|
|
258
|
|
259 <pre>
|
|
260 <!-- Digilib servlet config file -->
|
|
261
|
|
262 <digilib-config>
|
|
263 <parameter name="debug-level" value="0" />
|
|
264
|
|
265 <!-- Image to be sent to indicate general failure. -->
|
|
266 <parameter name="error-image" value=<b>"/docuserver/images/icons/broken.gif"</b> />
|
|
267
|
|
268 <!-- Image to be sent to indicate authorization failure. -->
|
|
269 <parameter name="denied-image" value=<b>"/docuserver/images/icons/alert.red.gif"</b> />
|
|
270
|
|
271 <!-- List of directories where images are searched.
|
108
|
272 The authoritative directory with the high-resolution images
|
|
273 is first in list. -->
|
|
274 <parameter name="basedir-list" value=<b>"/docuserver/images:/docuserver/scaled/small"</b> />
|
22
|
275
|
112
|
276 <!-- Java class to use for image operations -->
|
|
277 <parameter name="docuimage-class" value="digilib.image.JAIDocuImage" />
|
|
278
|
|
279 <!-- is sending whole image files with mo=file allowed? -->
|
|
280 <parameter name="sendfile-allowed" value="true" />
|
|
281
|
22
|
282 <!-- Restrict access to authorized users.
|
|
283 User authentication and roles are provided by the servlet container
|
|
284 (see tomcat-users.xml).
|
|
285 Authorization for resources (directories) is evaluated by the servlet
|
|
286 (see auth-file). -->
|
|
287 <parameter name="use-authorization" value="true" />
|
|
288
|
108
|
289 <!-- Location of XML file with authorization requirements. -->
|
22
|
290 <parameter name="auth-file" value=<b>"/docuserver/www/digitallibrary/WEB-INF/digilib-auth.xml"</b> />
|
|
291
|
|
292 <!-- Part of URL to indicate authenticated access to Tomcat. -->
|
|
293 <parameter name="auth-url-path" value="authenticated/" />
|
|
294 </digilib-config>
|
|
295 </pre>
|
|
296
|
|
297 <p>You have to adjust the <code>basedir-list</code> parameter to the
|
|
298 directories where your images are installed. You need only one
|
|
299 directory if you do not have prescaled low resolution versions of your
|
108
|
300 images. The directory with the high-resolution versions must be the
|
|
301 first entry in the list.</p>
|
22
|
302
|
|
303 <p>You can supply your own images for the "error" and
|
|
304 "access denied" messages by the servlet. Standard images
|
|
305 will be used if these parameters are undefined.</p>
|
|
306
|
|
307 <p>The <code>auth-file</code> parameter has to point to the
|
|
308 authorization configuration file (see below).</p>
|
|
309
|
112
|
310 <p>You can specify the Java toolkit implementation with the
|
|
311 <code>docuimage-class</code> parameter. The
|
|
312 <code>ImageLoaderDocuImage</code> might give best performance but
|
|
313 works only with JDK 1.4 and up. <code>JAIDocuImage</code> works with
|
|
314 JDK 1.3 and up.</p>
|
22
|
315
|
|
316 <h3>digilib-auth.xml</h3>
|
|
317
|
|
318 <p>The digilib access authorization is defined in the file defined by
|
|
319 the <code>auth-file</code> parameter (usually
|
|
320 <code>digilib-auth.xml</code> in <code>WEB-INF</code>). </p>
|
|
321
|
|
322 <p>The file has two parts <code>diglib-paths</code> and
|
|
323 <code>diglib-addresses</code>. It looks like this:</p>
|
|
324
|
|
325 <pre>
|
|
326 <auth-config>
|
|
327
|
|
328 <digilib-paths>
|
|
329 <!--
|
|
330 A user must supply one of the roles under "role"
|
|
331 to access the directory "name".
|
|
332 Roles under "role" must be separated by comma only (no spaces).
|
|
333 -->
|
|
334 <path name="histast/eastwood-collection" role="eastwood-coll" />
|
|
335 <path name="ptolemaios_geo" role="ptolemaios-geo" />
|
|
336 </digilib-paths>
|
|
337
|
|
338 <digilib-addresses>
|
|
339 <!--
|
|
340 A computer with an ip address that matches "ip"
|
|
341 is automatically granted all roles under "role".
|
|
342 The ip address is matched from the left (in full quads).
|
|
343 Roles under "role" must be separated by comma only (no spaces).
|
|
344 -->
|
|
345 <address ip="127" role="local" />
|
|
346 <address ip="130.92.68" role="eastwood-coll,ptolemaios-geo" />
|
|
347 <address ip="130.92.151" role="ALL" />
|
|
348 </digilib-addresses>
|
|
349
|
|
350 </auth-config>
|
|
351 </pre>
|
|
352
|
|
353 <p><code>diglib-paths</code> defines restricted directories and
|
|
354 the roles needed for access. The roles are defined with the users in
|
|
355 <code>tomcat-users.xml</code> (see above). All subdirectories of the
|
|
356 given directories have the same restrictions. All directories not
|
|
357 listed here (and not subdirectories of listed directories) are freely
|
|
358 accessible.</p>
|
|
359
|
|
360 <p><code>diglib-addresses</code> defines hosts or networks of
|
|
361 computers that are automatically authenticated without username and
|
|
362 password. Hosts can be assigned roles. The special keyword <code>ALL</code>
|
|
363 authorizes for everything. If the role assigned to the computer is not
|
|
364 sufficient to access a resource the user will be asked for username
|
|
365 and password.</p>
|
|
366
|
|
367
|
|
368
|
|
369 <hr>
|
163
|
370 <address>robert.casties@philo.unibe.ch</address>
|
|
371 <!-- hhmts start -->Last modified: Tue Sep 16 20:37:12 CEST 2003 <!-- hhmts end -->
|
22
|
372 </body> </html>
|