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