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>
|
108
|
11 <li>Java JDK >1.2 (preferred 1.4 and up)</li>
|
|
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>
|
22
|
22 <li>digilib configuration files for tomcat 4 package
|
108
|
23 <a href="http://download.berlios.de/digilib/alcatraz-tomconf-0.1.zip"><code>alcatraz-tomconf.zip</code></a> (Not essential)</li>
|
22
|
24 </ul>
|
|
25 </li>
|
|
26 </ul>
|
|
27
|
|
28 <h1>Installation</h1>
|
|
29
|
|
30 <h2>On Linux</h2>
|
|
31
|
|
32 <ol>
|
108
|
33 <li>Make shure the Java JDK is installed (a JRE won't do).</li>
|
|
34
|
22
|
35 <li>Create a base directory for docuserver (the default used here is
|
|
36 <code>/docuserver</code>) and for the web interface
|
|
37 (<code>/docuserver/www</code>).</li>
|
108
|
38
|
|
39 <li>Unpack the <code>alcatraz-core</code> package in the web
|
22
|
40 interface directory (<code>/docuserver/www</code>). This will create
|
|
41 the digilib directory <code>digitallibrary</code>.</li>
|
108
|
42
|
|
43 <li>Unpack Jakarta Tomcat 4.1.24 in <code>/docuserver</code> This should
|
|
44 produce a directory <code>/docuserver/jakarta-tomcat-4.1.24</code>. Create a
|
|
45 link <code>/docuserver/tomcat</code> to the new directory.</li>
|
|
46
|
|
47 <li>(optional) Unpack the configuration files package
|
22
|
48 <code>digilib-tomconf</code> in the tomcat directory.</li>
|
108
|
49
|
|
50 <li>Create a link from the digilib directory into the Tomcat webapps
|
|
51 directory <code>/docuserver/tomcat/webapps</code> (type <code>ln -s
|
|
52 /docuserver/www/digitallibrary /docuserver/tomcat/webapps</code>) This is
|
|
53 the default installation running on port 8080 as
|
|
54 <code>http://myserver:8080/digitallibrary/</code>.</li>
|
|
55
|
22
|
56 <li>Adjust the path to the JDK and its options in
|
|
57 <code>catalina.sh</code> (in the directory
|
108
|
58 <code>/docuserver/tomcat/bin</code>, see below for details)</li>
|
|
59
|
22
|
60 <li>(optional) For SuSE Linux you can use the startup skript
|
|
61 <code>tomcat/bin/rctomcat</code>
|
|
62 to start and stop the tomcat server. Copy the script into
|
|
63 <code>/etc/init.d</code> as <code>tomcat</code> and set runlevel
|
|
64 links accordingly.</li>
|
108
|
65
|
22
|
66 <li>(optional) Set the tomcat directory and all files to be owned by
|
108
|
67 the user <code>wwwrun</code> (or whatever your webserver runs) and
|
|
68 use this account to start the tomcat server.</li>
|
|
69
|
112
|
70 <li>(optional) To use Mozilla-XUL functionality Alcatraz users have
|
|
71 to open the page
|
|
72 <code>http://myserver:8080/docuserver/digitallibrary/xul/install.html</code>
|
|
73 in a Mozilla compatible browser. There the users can find
|
|
74 instructions to install XUL-Components into their browser. </li>
|
108
|
75
|
22
|
76 </ol>
|
|
77
|
|
78
|
|
79 <!--
|
|
80 <h2>Apache connector module</h2>
|
|
81
|
|
82 <p>digilib currently needs to be accessed through the Apache
|
|
83 webserver. There are two possible connectors for Apache and Tomcat4:
|
|
84 <code>mod_webapp</code> and <code>mod_jk</code>. Only
|
|
85 <code>mod_webapp</code> has been tested so far.</p>
|
|
86
|
|
87 <ol>
|
|
88 <li>Get the sources for <code>mod_webapp</code></li>
|
|
89 </ol>
|
|
90 -->
|
|
91
|
|
92 <h1>Configuration</h1>
|
|
93
|
|
94 <h2>Tomcat</h2>
|
|
95
|
|
96 <h3>catalina.sh</h3>
|
|
97
|
108
|
98 <p>The file <code>catalina.sh</code> (in <code>/docuserver/tomcat/bin</code>
|
|
99 can be modified to provide the path to the JDK and runtime options
|
|
100 for the Java VM. Somewhere at the beginning of the file you can put two lines
|
22
|
101 like this:</p>
|
|
102
|
|
103 <pre>
|
112
|
104 export JAVA_HOME=/usr/local/lib/IBMJava2-14
|
22
|
105 export CATALINA_OPTS="-mx512m"
|
|
106 </pre>
|
|
107
|
|
108 <p>Adjust the <code>JAVA_HOME</code> path to point to your Java JDK
|
|
109 installation directory. You can adjust the memory used by the Java VM
|
112
|
110 with the <code>-mx</code> option.</p>
|
22
|
111
|
|
112 <p>You can delete those two lines if you set these variables in your
|
|
113 shell before starting tomcat in that same shell. These lines are
|
108
|
114 needed if you want to use the startup script mentioned above under
|
|
115 linux .</p>
|
22
|
116
|
|
117
|
|
118 <h3>tomcat-users.xml</h3>
|
|
119
|
|
120 <p>All passwords and usernames have to be set up in the file
|
108
|
121 <code>tomcat-users.xml</code> in <code>/docuserver/tomcat/conf</code> if you
|
22
|
122 want to use authentication in digilib. The file looks like this:</p>
|
|
123
|
|
124 <pre>
|
|
125 <tomcat-users>
|
|
126 <user name="tomcat" password="tomcat" roles="tomcat" />
|
|
127 <user name="role1" password="tomcat" roles="role1" />
|
|
128 <user name="both" password="tomcat" roles="tomcat,role1" />
|
|
129 </tomcat-users>
|
|
130 </pre>
|
|
131
|
|
132 <p>A user is identified by a <code>name</code> and
|
|
133 <code>password</code>. These two elements have to be entered in a
|
|
134 authentication form presented by the browser when accessing a
|
|
135 restricted resource. A user can have one or more
|
|
136 <code>roles</code>. These roles will be used by digilib to decide if
|
|
137 an authenticated user is allowed to access a document (see
|
|
138 <code>digilib-auth.xml</code> below).</p>
|
|
139
|
108
|
140 <p>If you want to use the webinterface to configure Tomcat, you have to
|
|
141 add administrational account with the roles <code>admin</code> and
|
|
142 <code>manager</code>.</p>
|
|
143
|
22
|
144 <p>tomcat has to be restarted before changes to
|
|
145 <code>tomcat-users.xml</code> have effect!</p>
|
|
146
|
108
|
147
|
22
|
148 <h2>Digilib</h2>
|
|
149
|
|
150 <h3>web.xml</h3>
|
|
151
|
|
152 <p>The deployment of the digilib servlets and JSPs is defined in the
|
|
153 file <code>web.xml</code> in the <code>WEB-INF</code> subdirectory of
|
|
154 the digilib directory
|
|
155 (<code>/docuserver/www/digitallibrary/WEB-INF</code>).</p>
|
|
156
|
108
|
157 <p>The only parameter you will have to adjust is the position of the
|
22
|
158 digilib configuration file. The parameter occurs twice in the file and
|
|
159 looks like this:</p>
|
|
160
|
|
161 <pre>
|
|
162 <!-- parameters to the servlet -->
|
|
163 <init-param>
|
|
164 <param-name>config-file</param-name>
|
|
165 <param-value>
|
|
166 <b>/docuserver/www/digitallibrary/WEB-INF/digilib-config.xml</b>
|
|
167 </param-value>
|
|
168 </init-param>
|
|
169 </pre>
|
|
170
|
108
|
171 <p>Change the path to point where you installed the configuration files.</p>
|
22
|
172
|
108
|
173 <p>Make shure to change the parameter in both places in the config
|
|
174 file! It is needed both for the servlet and the JSP pages!</p>
|
|
175
|
22
|
176
|
|
177 <h3>digilib-config.xml</h3>
|
|
178
|
|
179 <p>The main configuration for digilib is
|
|
180 <code>digilib-config.xml</code>. It's position is defined by the
|
|
181 <code>config-file</code> init-parameter to the servlets (see
|
|
182 above).</p>
|
|
183
|
|
184 <p>In the configuration file you can set several paths and
|
|
185 options. The file looks like this:</p>
|
|
186
|
|
187 <pre>
|
|
188 <!-- Digilib servlet config file -->
|
|
189
|
|
190 <digilib-config>
|
|
191 <parameter name="debug-level" value="0" />
|
|
192
|
|
193 <!-- Image to be sent to indicate general failure. -->
|
|
194 <parameter name="error-image" value=<b>"/docuserver/images/icons/broken.gif"</b> />
|
|
195
|
|
196 <!-- Image to be sent to indicate authorization failure. -->
|
|
197 <parameter name="denied-image" value=<b>"/docuserver/images/icons/alert.red.gif"</b> />
|
|
198
|
|
199 <!-- List of directories where images are searched.
|
108
|
200 The authoritative directory with the high-resolution images
|
|
201 is first in list. -->
|
|
202 <parameter name="basedir-list" value=<b>"/docuserver/images:/docuserver/scaled/small"</b> />
|
22
|
203
|
112
|
204 <!-- Java class to use for image operations -->
|
|
205 <parameter name="docuimage-class" value="digilib.image.JAIDocuImage" />
|
|
206
|
|
207 <!-- is sending whole image files with mo=file allowed? -->
|
|
208 <parameter name="sendfile-allowed" value="true" />
|
|
209
|
22
|
210 <!-- Restrict access to authorized users.
|
|
211 User authentication and roles are provided by the servlet container
|
|
212 (see tomcat-users.xml).
|
|
213 Authorization for resources (directories) is evaluated by the servlet
|
|
214 (see auth-file). -->
|
|
215 <parameter name="use-authorization" value="true" />
|
|
216
|
108
|
217 <!-- Location of XML file with authorization requirements. -->
|
22
|
218 <parameter name="auth-file" value=<b>"/docuserver/www/digitallibrary/WEB-INF/digilib-auth.xml"</b> />
|
|
219
|
|
220 <!-- Part of URL to indicate authenticated access to Tomcat. -->
|
|
221 <parameter name="auth-url-path" value="authenticated/" />
|
|
222 </digilib-config>
|
|
223 </pre>
|
|
224
|
|
225 <p>You have to adjust the <code>basedir-list</code> parameter to the
|
|
226 directories where your images are installed. You need only one
|
|
227 directory if you do not have prescaled low resolution versions of your
|
108
|
228 images. The directory with the high-resolution versions must be the
|
|
229 first entry in the list.</p>
|
22
|
230
|
|
231 <p>You can supply your own images for the "error" and
|
|
232 "access denied" messages by the servlet. Standard images
|
|
233 will be used if these parameters are undefined.</p>
|
|
234
|
|
235 <p>The <code>auth-file</code> parameter has to point to the
|
|
236 authorization configuration file (see below).</p>
|
|
237
|
112
|
238 <p>You can specify the Java toolkit implementation with the
|
|
239 <code>docuimage-class</code> parameter. The
|
|
240 <code>ImageLoaderDocuImage</code> might give best performance but
|
|
241 works only with JDK 1.4 and up. <code>JAIDocuImage</code> works with
|
|
242 JDK 1.3 and up.</p>
|
22
|
243
|
|
244 <h3>digilib-auth.xml</h3>
|
|
245
|
|
246 <p>The digilib access authorization is defined in the file defined by
|
|
247 the <code>auth-file</code> parameter (usually
|
|
248 <code>digilib-auth.xml</code> in <code>WEB-INF</code>). </p>
|
|
249
|
|
250 <p>The file has two parts <code>diglib-paths</code> and
|
|
251 <code>diglib-addresses</code>. It looks like this:</p>
|
|
252
|
|
253 <pre>
|
|
254 <auth-config>
|
|
255
|
|
256 <digilib-paths>
|
|
257 <!--
|
|
258 A user must supply one of the roles under "role"
|
|
259 to access the directory "name".
|
|
260 Roles under "role" must be separated by comma only (no spaces).
|
|
261 -->
|
|
262 <path name="histast/eastwood-collection" role="eastwood-coll" />
|
|
263 <path name="ptolemaios_geo" role="ptolemaios-geo" />
|
|
264 </digilib-paths>
|
|
265
|
|
266 <digilib-addresses>
|
|
267 <!--
|
|
268 A computer with an ip address that matches "ip"
|
|
269 is automatically granted all roles under "role".
|
|
270 The ip address is matched from the left (in full quads).
|
|
271 Roles under "role" must be separated by comma only (no spaces).
|
|
272 -->
|
|
273 <address ip="127" role="local" />
|
|
274 <address ip="130.92.68" role="eastwood-coll,ptolemaios-geo" />
|
|
275 <address ip="130.92.151" role="ALL" />
|
|
276 </digilib-addresses>
|
|
277
|
|
278 </auth-config>
|
|
279 </pre>
|
|
280
|
|
281 <p><code>diglib-paths</code> defines restricted directories and
|
|
282 the roles needed for access. The roles are defined with the users in
|
|
283 <code>tomcat-users.xml</code> (see above). All subdirectories of the
|
|
284 given directories have the same restrictions. All directories not
|
|
285 listed here (and not subdirectories of listed directories) are freely
|
|
286 accessible.</p>
|
|
287
|
|
288 <p><code>diglib-addresses</code> defines hosts or networks of
|
|
289 computers that are automatically authenticated without username and
|
|
290 password. Hosts can be assigned roles. The special keyword <code>ALL</code>
|
|
291 authorizes for everything. If the role assigned to the computer is not
|
|
292 sufficient to access a resource the user will be asked for username
|
|
293 and password.</p>
|
|
294
|
|
295
|
|
296
|
|
297 <hr>
|
112
|
298 <address>casties@mpiwg-berlin.mpg.de</address>
|
|
299 <!-- hhmts start -->Last modified: Wed May 14 12:49:14 CEST 2003 <!-- hhmts end -->
|
22
|
300 </body> </html>
|