1 |
878
|
berkley
|
<!--
|
2 |
|
|
* '$RCSfile$'
|
3 |
|
|
* Purpose: web page describing the installation of Metacat
|
4 |
|
|
* Copyright: 2000 Regents of the University of California and the
|
5 |
|
|
* National Center for Ecological Analysis and Synthesis
|
6 |
|
|
* Authors: Chad Berkley
|
7 |
|
|
*
|
8 |
|
|
* '$Author$'
|
9 |
|
|
* '$Date$'
|
10 |
|
|
* '$Revision$'
|
11 |
|
|
*
|
12 |
|
|
*
|
13 |
|
|
-->
|
14 |
|
|
|
15 |
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD html 4.0//EN">
|
16 |
|
|
<html>
|
17 |
|
|
|
18 |
|
|
<head>
|
19 |
|
|
<title>Metacat Installation Instructions</title>
|
20 |
|
|
<link rel="stylesheet" type="text/css" href="@docrooturl@default.css">
|
21 |
|
|
</head>
|
22 |
|
|
|
23 |
|
|
<body>
|
24 |
|
|
|
25 |
|
|
<table class="tabledefault" width="100%">
|
26 |
|
|
<tr><td rowspan="2"><img src="@docrooturl@images/KNBLogo.gif"></td>
|
27 |
|
|
<td colspan="7">
|
28 |
|
|
<div class="title">Metacat UNIX Installation Instructions</div>
|
29 |
|
|
</td>
|
30 |
|
|
</tr>
|
31 |
|
|
<tr>
|
32 |
|
|
<td><a href="@server@/" class="toollink"> KNB Home </a></td>
|
33 |
|
|
<td><a href="@server@/data.html" class="toollink"> Data </a></td>
|
34 |
|
|
<td><a href="@server@/people.html" class="toollink"> People </a></td>
|
35 |
|
|
<td><a href="@server@/informatics" class="toollink"> Informatics </a></td>
|
36 |
|
|
<td><a href="@server@/biodiversity" class="toollink"> Biocomplexity </a></td>
|
37 |
|
|
<td><a href="@server@/education" class="toollink"> Education </a></td>
|
38 |
|
|
<td><a href="@server@/software" class="toollink"> Software </a></td>
|
39 |
|
|
</tr>
|
40 |
|
|
</table>
|
41 |
|
|
<hr>
|
42 |
|
|
|
43 |
|
|
<table class="tabledefault" width="100%">
|
44 |
|
|
<td class="tablehead" colspan="2"><p class="emphasis">***Disclaimer***</p></td>
|
45 |
|
|
<tr>
|
46 |
|
|
<td>
|
47 |
|
|
<p class="emphasis">
|
48 |
932
|
jones
|
These installation instructions are meant for a systems administrator/DBA
|
49 |
|
|
or someone who is an advanced computer user. They are NOT meant for
|
50 |
|
|
the average computer user. Please realize that by executing these
|
51 |
|
|
instructions, you may have to trouble shoot many advanced issues yourself.
|
52 |
878
|
berkley
|
</td>
|
53 |
|
|
</tr>
|
54 |
|
|
</table>
|
55 |
|
|
|
56 |
|
|
<table class="tabledefault" width="100%">
|
57 |
|
|
<td class="tablehead" colspan="2"><p>Pre-Installation</p></td>
|
58 |
|
|
<tr>
|
59 |
|
|
<td>
|
60 |
|
|
<p class="header">Minimum Requirements</p>
|
61 |
|
|
<p>
|
62 |
|
|
Installing Metacat requires a server running an SQL92 compliant database
|
63 |
|
|
(Oracle 8i recommended) with at least 128MB RAM, and a Pentium III class
|
64 |
|
|
processor or higher. The amount of disk space required depends on the
|
65 |
|
|
size of your RDBMS tablespace (which should be at least 10 MB,
|
66 |
|
|
however Metacat itself requires only about 1 MB of free space after
|
67 |
|
|
installation. These instructions assume a Linux environment but may
|
68 |
|
|
work on other UNIX type environments, however this has not been tested.
|
69 |
|
|
</p>
|
70 |
|
|
<p class = "header">Additional Required Software</p>
|
71 |
|
|
<p>
|
72 |
|
|
The server on which you wish to install Metacat must have the following
|
73 |
|
|
software installed and running correctly before attempting to install
|
74 |
|
|
Metacat.
|
75 |
|
|
<ul>
|
76 |
|
|
<li><a href="http://www.oracle.com">Oracle 8i</a> (or another SQL92
|
77 |
932
|
jones
|
compliant RDBMS like Postgres)</li>
|
78 |
878
|
berkley
|
<li><a href="http://jakarta.apache.org/ant/index.html">Apache Jakarta-Ant</a>
|
79 |
|
|
</li>
|
80 |
|
|
<li><a href="http://jakarta.apache.org/tomcat/index.html">Apache Jakarta-Tomcat</a>
|
81 |
932
|
jones
|
<p class="emphasis">Note: For a more robust web serving environment,
|
82 |
|
|
Apache web server should
|
83 |
878
|
berkley
|
be installed along with Tomcat and the two should be integrated
|
84 |
|
|
as described on the Apache web site.</p>
|
85 |
|
|
</li>
|
86 |
|
|
</ul>
|
87 |
|
|
</p>
|
88 |
|
|
</td>
|
89 |
|
|
</tr>
|
90 |
|
|
</table>
|
91 |
|
|
|
92 |
|
|
<table class="tabledefault" width="100%">
|
93 |
|
|
<td class="tablehead" colspan="2"><p>Aditional Software Setup</p></td>
|
94 |
|
|
<tr>
|
95 |
|
|
<td>
|
96 |
2182
|
jones
|
<p class="header">Java</p>
|
97 |
2302
|
costa
|
<p>You'll need a recent Java SDK; j2sdk1.4.2 or later is required. We haven't
|
98 |
2182
|
jones
|
tested with any of the 1.5.x versions yet, so probably best to stay with 1.4.x.
|
99 |
|
|
Make sure that JAVA_HOME environment variable is properly set and that both
|
100 |
|
|
java and javac are on your PATH.
|
101 |
|
|
</p>
|
102 |
|
|
<p class="header">Oracle 8i or Postgres</p>
|
103 |
|
|
<p><i>Oracle:</i><br>
|
104 |
878
|
berkley
|
The Oracle RDBMS must be installed and running as a daemon on the system.
|
105 |
|
|
In addition the JDBC listener must be enabled. You can enable it by
|
106 |
|
|
logging in as your Oracle user and typing the following:
|
107 |
|
|
<pre>lsnrctl start</pre>
|
108 |
|
|
Your instance should have a table space of at least 5 MB (10 MB or higher
|
109 |
|
|
recommended). You should also have a username specific to Metacat
|
110 |
|
|
created and enabled. This user must have most normal permissions
|
111 |
|
|
including CREATE SESSION, CREATE TABLE, CREATE INDEX, CREATE TRIGGER,
|
112 |
|
|
EXECUTE PROCEDURE, EXECUTE TYPE, etc. If an action is unexplainably
|
113 |
|
|
rejected by Metacat it is probably because the user permissions are not
|
114 |
|
|
correctly set.
|
115 |
|
|
</p>
|
116 |
2182
|
jones
|
<p><i>Postgres:</i><br>
|
117 |
|
|
Postgres can be easily installed on most linux distributions and on
|
118 |
|
|
Windows (using cygwin) and Mac OS X. Using Fedora Core or RedHat Linux,
|
119 |
|
|
you can install the rpms for postgres and then run
|
120 |
|
|
<code>/etc/init.d/postgresql start</code> in order to start the database.
|
121 |
|
|
This initializes the data files. You need to do a bit of configuration
|
122 |
|
|
to create a database and set up a user account and allow internet access
|
123 |
|
|
via jdbc. See the postgres documentation for this, but here is a quick
|
124 |
|
|
start:
|
125 |
|
|
<ul>
|
126 |
|
|
<li>Switch to the "postgres" user account and edit "data/pg_hba.conf", adding the following line to the file:<br>
|
127 |
2455
|
jones
|
<code>host metacat metacat 127.0.0.1 255.255.255.255 password</code><br>
|
128 |
|
|
If your host uses IPv6 addresses, you made need this line instead:
|
129 |
|
|
<code>host metacat metacat ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff password</code></li>
|
130 |
2182
|
jones
|
<li>Edit the "data/postgres.conf" file and uncomment and edit the line
|
131 |
|
|
starting with "tcpip_socket" so that it reads
|
132 |
|
|
<code>tcpip_socket = true</code></li>
|
133 |
|
|
<li>Run <code>createdb metacat</code> to create a new database</li>
|
134 |
|
|
<li>Run <code>psql metacat</code> to log in using the postgres account and create a new "metacat" user account
|
135 |
|
|
<ul>
|
136 |
|
|
<li>In postgres, run <code>CREATE USER metacat WITH UNENCRYPTED PASSWORD 'apasswordyoulike';</code></li>
|
137 |
|
|
<li>This creates a new account called metacat on the database named metacat</li>
|
138 |
|
|
<li>Note: there are many ways to do this, so others such as using
|
139 |
|
|
ENCRYPTED passwords will work fine.</li>
|
140 |
|
|
</ul>
|
141 |
|
|
</li>
|
142 |
|
|
<li>Exit the postgres account back to root and restart the postgres
|
143 |
|
|
database with <code>/etc/init.d/postgresql restart</code></li>
|
144 |
|
|
<li>Test logging into the postgres db using the metacat account with
|
145 |
|
|
the following command:
|
146 |
|
|
<code>psql -U metacat -W -h localhost metacat</code></li>
|
147 |
|
|
</ul>
|
148 |
|
|
</p>
|
149 |
878
|
berkley
|
<p class="header">Ant</p>
|
150 |
|
|
<p>
|
151 |
|
|
Ant is a Java based build application similar to Make on UNIX systems.
|
152 |
|
|
It takes in installation parameters from a file in the root installation
|
153 |
|
|
directory named "build.xml". The Metacat CVS module contains a default
|
154 |
|
|
build.xml file that may require some modification upon installation. Ant
|
155 |
932
|
jones
|
should be installed on the system and the "ant" executable shell script
|
156 |
2182
|
jones
|
should be available in the users path. We note that the current build is
|
157 |
|
|
not working with Ant 1.6.x, so you'll need to use an earler version. We have
|
158 |
|
|
successfully used Ant 1.5.1, 1.5.2, and some earlier versions.
|
159 |
878
|
berkley
|
</p>
|
160 |
|
|
<p class="header">Tomcat</p>
|
161 |
|
|
<p>
|
162 |
2302
|
costa
|
Install Tomcat into the directory of your choice. The directory in which
|
163 |
1770
|
tao
|
you install Tomcat itself will be referred to as the "$CATALINA_HOME".
|
164 |
2501
|
costa
|
We recommend that you install Tomcat version 5.0. More details about
|
165 |
2302
|
costa
|
Tomcat installation is available <a href=" http://jakarta.apache.org/tomcat/index.html">here</a>.
|
166 |
878
|
berkley
|
</p>
|
167 |
1770
|
tao
|
</td>
|
168 |
878
|
berkley
|
</tr>
|
169 |
|
|
</table>
|
170 |
|
|
|
171 |
|
|
<table class="tabledefault" width="100%">
|
172 |
1770
|
tao
|
<td class="tablehead" colspan="2"></td>
|
173 |
878
|
berkley
|
<tr>
|
174 |
|
|
<td>
|
175 |
|
|
<p>
|
176 |
|
|
Once all of the prerequisite software is installed as described above,
|
177 |
|
|
the installation of Metacat can begin. First you must have a current
|
178 |
|
|
version of the source distribution of Metacat. You can get it two ways.
|
179 |
|
|
Authorized users can check it out of the NCEAS
|
180 |
|
|
<a href="http://www.nceas.ucsb.edu/cgi-bin/cvsweb.cgi/xmltodb/">CVS</a>
|
181 |
2183
|
jones
|
system. You'll need both the "metacat" module and the "utilities" module to
|
182 |
|
|
be checked out in sibling directories. The command is as follows:
|
183 |
|
|
<pre>mkdir knb-software</pre>
|
184 |
|
|
<pre>cd knb-software</pre>
|
185 |
|
|
<pre>cvs checkout -P metacat</pre>
|
186 |
|
|
<pre>cvs checkout -P utilities</pre>
|
187 |
|
|
Or you can
|
188 |
878
|
berkley
|
<a href="@server@/software/download.html">download</a> a gzipped tar file
|
189 |
|
|
from this site.
|
190 |
|
|
</p>
|
191 |
2302
|
costa
|
<p><h2>Edit <code>build.properties</code> File</h2></p>
|
192 |
878
|
berkley
|
<p>
|
193 |
|
|
Once you have either checked out or unzipped and untarred the source
|
194 |
|
|
distribution, you can begin the installation process. Change into the
|
195 |
2302
|
costa
|
metacat directory and edit the file called "<code>build.properties</code>". You will need
|
196 |
932
|
jones
|
to change a number of configuration properties to match the setup on
|
197 |
2302
|
costa
|
your system.
|
198 |
878
|
berkley
|
</p>
|
199 |
|
|
<p>
|
200 |
2302
|
costa
|
The properties that you will likely need to change will include
|
201 |
|
|
<code>tomcat</code>, <code>tomcatversion</code>, <code>webapps</code>,
|
202 |
|
|
<code>context</code>, <code>server</code>, <code>httpserver</code>,
|
203 |
|
|
<code>database</code>, <code>jdbc-connect</code>, <code>jdbc-base</code>,
|
204 |
|
|
<code>user</code>, <code>password</code>, <code>datafilepath</code>,
|
205 |
|
|
<code>inlinedatafilepath</code>, <code>cvsroot</code>,
|
206 |
2501
|
costa
|
<code>default-style</code>, and <code>administrators</code>.
|
207 |
2302
|
costa
|
Each is described in detail in the table below.
|
208 |
878
|
berkley
|
</p>
|
209 |
2302
|
costa
|
Properties you will likely need to change:
|
210 |
|
|
<br><br>
|
211 |
|
|
<table border="1">
|
212 |
|
|
<tr>
|
213 |
|
|
<td><b>Property</b></td>
|
214 |
|
|
<td><b>Description</b></td>
|
215 |
|
|
<td><b>Default value and examples of other values</b></td>
|
216 |
|
|
</tr>
|
217 |
|
|
<tr>
|
218 |
|
|
<td>tomcat</td>
|
219 |
|
|
<td>The tomcat property is the location in which tomcat is installed.</td>
|
220 |
|
|
<td>Default:
|
221 |
|
|
<code>/usr/local/devtools/jakarta-tomcat</code>
|
222 |
|
|
<br><br>Example:
|
223 |
2501
|
costa
|
<code>C:/Tomcat5</code></td>
|
224 |
2302
|
costa
|
</tr>
|
225 |
|
|
<tr>
|
226 |
|
|
<td>tomcatversion</td>
|
227 |
|
|
<td>The tomcatversion property is the version of your Tomcat. You should
|
228 |
2501
|
costa
|
put tomcat3, tomcat4, or tomcat5 here.
|
229 |
2309
|
jones
|
</td>
|
230 |
2302
|
costa
|
<td>Default:
|
231 |
2501
|
costa
|
<code>tomcat5</code>
|
232 |
2302
|
costa
|
<br><br>Example:
|
233 |
2501
|
costa
|
<code>tomcat5</code>
|
234 |
2302
|
costa
|
</td>
|
235 |
|
|
</tr>
|
236 |
|
|
<tr>
|
237 |
|
|
<td>webapps</td>
|
238 |
|
|
<td>The webapps property is the location in which your tomcat servlet
|
239 |
|
|
contexts are installed. This is typically "TOMCAT_HOME/webapps",
|
240 |
|
|
where TOMCAT_HOME is the same value that you entered for the 'tomcat'
|
241 |
|
|
property above.
|
242 |
|
|
</td>
|
243 |
|
|
<td>Default:
|
244 |
|
|
<code>/var/www/org.ecoinformatics.knb</code>
|
245 |
|
|
<br><br>Example:
|
246 |
2501
|
costa
|
<code>C:/Tomcat5/webapps</code>
|
247 |
2302
|
costa
|
</td>
|
248 |
|
|
</tr>
|
249 |
|
|
<tr>
|
250 |
|
|
<td>context</td>
|
251 |
|
|
<td>The context property is the name of the servlet context in which you
|
252 |
|
|
want Metacat to be installed. This will determine the installation
|
253 |
|
|
directory for the servlet and many of the URLs that are used to access
|
254 |
|
|
the installed Metacat server.</td>
|
255 |
|
|
<td>Default:
|
256 |
|
|
<code>knb</code>
|
257 |
|
|
<br><br>Example:
|
258 |
|
|
<code>mycontext</code>
|
259 |
|
|
</td>
|
260 |
|
|
</tr>
|
261 |
|
|
<tr>
|
262 |
|
|
<td>server</td>
|
263 |
2309
|
jones
|
<td>The server property is hostname of for the server on which Metacat is
|
264 |
2302
|
costa
|
running (note that you should not include the 'http://' in the server
|
265 |
2309
|
jones
|
property). The server setting should include the port number
|
266 |
|
|
appended to the end if Tomcat is running stand-alone (see example).
|
267 |
|
|
</td>
|
268 |
2302
|
costa
|
<td>Default:
|
269 |
|
|
<code>knb.ecoinformatics.org</code>
|
270 |
|
|
<br><br>Example:
|
271 |
2309
|
jones
|
<code>somehost.university.edu:8080</code>
|
272 |
2302
|
costa
|
</td>
|
273 |
|
|
</tr>
|
274 |
|
|
<tr>
|
275 |
|
|
<td>httpserver</td>
|
276 |
|
|
<td>httpserver is the plain HTTP address on which Metacat is running
|
277 |
2309
|
jones
|
(note that you should not include the 'http://' in the httpserver
|
278 |
|
|
property).
|
279 |
2302
|
costa
|
The httpserver setting should include the HTTP plain port number
|
280 |
|
|
appended to the end if Tomcat is running stand-alone (see example).</td>
|
281 |
|
|
<td>Default:
|
282 |
|
|
<code>knb.ecoinformatics.org</code>
|
283 |
|
|
<br><br>Example:
|
284 |
|
|
<code>somehost.university.edu:8080</code>
|
285 |
|
|
</td>
|
286 |
|
|
</tr>
|
287 |
|
|
<tr>
|
288 |
|
|
<td>ldapUrl</td>
|
289 |
2309
|
jones
|
<td>URL to the LDAP server. The LDAP server is used in the default
|
290 |
|
|
authentication module to authenticate and identify users of the
|
291 |
|
|
system. To participate in the KNB network, you should leave this at
|
292 |
|
|
the default. But it can be changed if you want to use a
|
293 |
|
|
different directory of users.
|
294 |
|
|
</td>
|
295 |
2302
|
costa
|
<td>Default:
|
296 |
|
|
<code>ldap://ldap.ecoinformatics.org/dc=ecoinformatics,dc=org</code>
|
297 |
|
|
</td>
|
298 |
|
|
</tr>
|
299 |
|
|
<tr>
|
300 |
|
|
<td>database</td>
|
301 |
|
|
<td>Select the database to use for metadata storage.
|
302 |
|
|
Valid values are <code>oracle</code>, <code>postgresql</code>, or
|
303 |
2309
|
jones
|
<code>sqlserver</code>. Note that sqlserver support is minimal and
|
304 |
|
|
probably will not work without substantial changes on your part,
|
305 |
|
|
possibly including code changes. We have not revcently tested on
|
306 |
|
|
sqlserver.
|
307 |
2302
|
costa
|
</td>
|
308 |
|
|
<td>Default:
|
309 |
|
|
<code>oracle</code>
|
310 |
|
|
<br><br>Other possible values:
|
311 |
|
|
<code>postgresql</code>
|
312 |
|
|
<code>sqlserver</code>
|
313 |
|
|
</td>
|
314 |
|
|
</tr>
|
315 |
|
|
<tr>
|
316 |
|
|
<td>jdbc-connect</td>
|
317 |
|
|
<td>The JDBC connection string used to connect to the database.</td>
|
318 |
|
|
<td>Default:
|
319 |
|
|
<code>jdbc:oracle:thin:@metacat.nceas.ucsb.edu:1521:knb</code>
|
320 |
|
|
</td>
|
321 |
|
|
<tr>
|
322 |
|
|
<td>jdbc-base</td>
|
323 |
|
|
<td>The base directory for locating JDBC jar files (not needed for postgresql).</td>
|
324 |
|
|
<td>Default:
|
325 |
|
|
<code>/usr/oracle/jdbc/lib</code>
|
326 |
|
|
<br><br>Example:
|
327 |
|
|
<code>C:/jdev10g/jdbc/lib</code><br>
|
328 |
|
|
</td>
|
329 |
|
|
</tr>
|
330 |
|
|
<tr>
|
331 |
|
|
<td>user</td>
|
332 |
|
|
<td>The database user name that you set up to use Metacat. For example,
|
333 |
|
|
an Oracle username.</td>
|
334 |
|
|
<td>Default:
|
335 |
|
|
<code>knb</code>
|
336 |
|
|
<br><br>Example:
|
337 |
|
|
<code>metacatdb</code>
|
338 |
|
|
</td>
|
339 |
|
|
</tr>
|
340 |
|
|
<tr>
|
341 |
|
|
<td>password</td>
|
342 |
|
|
<td>The database password that you set up to use Metacat.</td>
|
343 |
|
|
<td>Default:
|
344 |
|
|
<code>yourPasswordHere</code>
|
345 |
|
|
<br><br>Example:
|
346 |
|
|
<code>metacat123</code>
|
347 |
|
|
</td>
|
348 |
|
|
</tr>
|
349 |
|
|
<tr>
|
350 |
|
|
<td>datafilepath</td>
|
351 |
2309
|
jones
|
<td>The datafilepath is the directory to store data files.</td>
|
352 |
2302
|
costa
|
<td>Default:
|
353 |
|
|
<code>/var/metacat/data</code>
|
354 |
|
|
<br><br>Example:
|
355 |
2501
|
costa
|
<code>C:/Tomcat5/data/knb/data</code>
|
356 |
2302
|
costa
|
</td>
|
357 |
|
|
</tr>
|
358 |
|
|
<tr>
|
359 |
|
|
<td>inlinedatafilepath</td>
|
360 |
2309
|
jones
|
<td>The inlinedatafilepath is the directory to store inline data that
|
361 |
|
|
has been extracted from EML documents.</td>
|
362 |
2302
|
costa
|
<td>Default:
|
363 |
|
|
<code>/var/metacat/inline-data</code>
|
364 |
|
|
<br><br>Example:
|
365 |
2501
|
costa
|
<code>C:/Tomcat5/data/knb/inlinedata</code>
|
366 |
2302
|
costa
|
</td>
|
367 |
|
|
</tr>
|
368 |
|
|
<tr>
|
369 |
|
|
<td>default-style</td>
|
370 |
|
|
<td>The default-style parameter defines the "style-set" that is to be used
|
371 |
|
|
by default when the qformat parameter is missing or set to "html"
|
372 |
|
|
during a query. It is set to "knb", which is one of the styles that
|
373 |
|
|
ships with the default metacat distribution. Other possible settings
|
374 |
|
|
are shown in the examples to the right.</td>
|
375 |
|
|
<td>Default:
|
376 |
|
|
<code>knb</code>
|
377 |
|
|
<br><br>Examples:
|
378 |
|
|
<pre><code>default esa knb2 nceas nrs obfs specnet</code></pre>
|
379 |
|
|
</td>
|
380 |
|
|
</tr>
|
381 |
2309
|
jones
|
<tr>
|
382 |
|
|
<td>administrators</td>
|
383 |
|
|
<td>The administrators parameter lists the accounts that are allowed to
|
384 |
|
|
perform administrative actions such as rebuilding indices for
|
385 |
|
|
documents. The list can can contain more than one account separated
|
386 |
|
|
by colons.</td>
|
387 |
|
|
<td>Default:
|
388 |
|
|
<code>uid=jones,o=NCEAS,dc=ecoinformatics,dc=org</code>
|
389 |
|
|
<br><br>Examples:
|
390 |
|
|
<code>uid=localadmin,o=ucnrs.org</code>
|
391 |
|
|
</td>
|
392 |
|
|
</tr>
|
393 |
2903
|
harris
|
|
394 |
|
|
<!-- start lsid stuff -->
|
395 |
|
|
<tr>
|
396 |
|
|
<td>authority.context</td>
|
397 |
|
|
<td>This is the context for the (Life Sciences Identifier) LSID authority.
|
398 |
|
|
LSID support is an optional feature which can be configured to provide
|
399 |
|
|
metacat access to LSID clients. For more information on LSID's see <a href="http://wiki.gbif.org/guidwiki/wikka.php?wakka=LSID">TDWG
|
400 |
|
|
site</a>.</td>
|
401 |
|
|
<td>Default: authority</td>
|
402 |
|
|
</tr>
|
403 |
|
|
<tr>
|
404 |
|
|
<td>config.lsidauthority</td>
|
405 |
|
|
<td>This is the name of the LSID authority that this metacat should use.
|
406 |
|
|
This authority needs to be defined as SRV record in a DNS.</td>
|
407 |
2905
|
harris
|
<td><p>Default: ecoinformatics.org</p>
|
408 |
|
|
<p>Examples: esa.org or sulphur.ecoinformatics.org</p></td>
|
409 |
2903
|
harris
|
</tr>
|
410 |
2302
|
costa
|
</table>
|
411 |
|
|
<br>
|
412 |
989
|
berkley
|
<p>
|
413 |
|
|
Note that the build file is preconfigured to install Metacat either using
|
414 |
2302
|
costa
|
Oracle, PostgreSQL, or Microsoft SQL Server as a backend database.
|
415 |
|
|
To change the database system, simply change the value of the 'database'
|
416 |
|
|
property to be the name of the database target that you wish to use
|
417 |
|
|
(either 'oracle', 'postgresql', or 'sqlserver').
|
418 |
989
|
berkley
|
</p>
|
419 |
2302
|
costa
|
Other properties in <code>build.properties</code> that you can (but generally need not) change:<br />
|
420 |
|
|
<br>
|
421 |
|
|
<table border="1">
|
422 |
|
|
<tr>
|
423 |
|
|
<td><b>Property</b></td>
|
424 |
|
|
<td><b>Description</b></td>
|
425 |
|
|
<td><b>Default value and examples of other values</b></td>
|
426 |
|
|
</tr>
|
427 |
|
|
<tr>
|
428 |
|
|
<td>inst.cgi.dir</td>
|
429 |
|
|
<td>Installation directory for registry CGI scripts</td>
|
430 |
|
|
<td>Default:
|
431 |
|
|
<code>/var/www/cgi-knb</code>
|
432 |
|
|
</td>
|
433 |
|
|
</tr>
|
434 |
|
|
<tr>
|
435 |
|
|
<td>cgi-prefix</td>
|
436 |
|
|
<td> </td>
|
437 |
|
|
<td>Default:
|
438 |
|
|
<code>http://knb.ecoinformatics.org/cgi-bin</code>
|
439 |
|
|
</td>
|
440 |
|
|
</tr>
|
441 |
|
|
<tr>
|
442 |
|
|
<td>knb-site-url</td>
|
443 |
|
|
<td>This is the URL to the web context root for the knb site.
|
444 |
|
|
It is used for the qformat=knb skin only.</td>
|
445 |
|
|
<td>Default:
|
446 |
|
|
<code>http://knb.ecoinformatics.org</code>
|
447 |
|
|
</td>
|
448 |
|
|
</tr>
|
449 |
|
|
<tr>
|
450 |
|
|
<td>forcereplicationwaitingtime</td>
|
451 |
|
|
<td>The waiting time before replication is forced to begin after
|
452 |
|
|
uploading a package. The default value should usually suffice.</td>
|
453 |
|
|
<td>Default:
|
454 |
|
|
<code>30000</code>
|
455 |
|
|
<code> </code>
|
456 |
|
|
</td>
|
457 |
|
|
</tr>
|
458 |
2322
|
jones
|
<tr>
|
459 |
|
|
<td>cvsroot</td>
|
460 |
|
|
<td>CVS access to retrieve latest EML. Only used by
|
461 |
|
|
developers in building the release.</td>
|
462 |
|
|
<td>Default:
|
463 |
|
|
<code><pre>:ext:${env.USER}@cvs.ecoinformatics.org:/cvs</pre></code>
|
464 |
|
|
Example:
|
465 |
|
|
<code><pre>:ext:myaccount@cvs.ecoinformatics.org:/cvs</pre></code>
|
466 |
|
|
</td>
|
467 |
|
|
</tr>
|
468 |
2302
|
costa
|
</table>
|
469 |
|
|
<p>
|
470 |
|
|
Metacat has a number of additional settable properties in file
|
471 |
|
|
<code>metacat/lib/metacat.properties</code>. Under most circumstances,
|
472 |
|
|
you will not need to modify this file because the properties of interest
|
473 |
|
|
to you can be controlled by editing <code>build.properties</code> as
|
474 |
|
|
described above. To learn more about Metacat's additional properties,
|
475 |
|
|
see <a href="./properties.html">Metacat Properties File</a>.
|
476 |
|
|
</p>
|
477 |
878
|
berkley
|
<p class="emphasis">
|
478 |
2302
|
costa
|
Note: When setting properties, DO NOT add a trailing slash [/] to the end of any paths that are specified.
|
479 |
|
|
Metacat will not function correctly if you do so.
|
480 |
878
|
berkley
|
</p>
|
481 |
2322
|
jones
|
|
482 |
|
|
</td>
|
483 |
|
|
</tr>
|
484 |
|
|
</table>
|
485 |
|
|
|
486 |
|
|
<table class="tabledefault" width="100%">
|
487 |
|
|
<td class="tablehead" colspan="2"><p><h2>Compilation and Installation</h2></p></td>
|
488 |
|
|
<tr>
|
489 |
|
|
<td>
|
490 |
|
|
<a name="protocol"></a>
|
491 |
|
|
<p>
|
492 |
|
|
Ant allows compilation and installation to be done in one step.
|
493 |
|
|
Change into the metacat directory and type:
|
494 |
|
|
<pre><b>ant install</b></pre>
|
495 |
|
|
or, if you are upgrading an existing installation, type:
|
496 |
|
|
<pre><b>ant clean upgrade</b></pre>
|
497 |
|
|
<p>
|
498 |
|
|
You should see a bunch of messages telling you the progress of compilation
|
499 |
|
|
and installation. When it is done you should see the message
|
500 |
|
|
BUILD SUCCESSFUL
|
501 |
|
|
and you should be returned to a UNIX command prompt. If you do not see
|
502 |
|
|
the message BUILD SUCCESSFUL then there was an error that you need to
|
503 |
|
|
resolve.
|
504 |
|
|
This may come up if you are logged in as a user that does not have write
|
505 |
|
|
access to one or more of the directories that are listed in the build.xml
|
506 |
|
|
file, or if any of the paths to files are not configured correctly in the
|
507 |
|
|
"config" target.
|
508 |
|
|
</p>
|
509 |
|
|
<p>
|
510 |
|
|
Note: The 'data' directories that are indicated in the 'datafilepath' and
|
511 |
|
|
'inlinedatafilepath' build properties must be writeable
|
512 |
|
|
by user account under which Tomcat runs or you will not be able to upload
|
513 |
|
|
data files to the system.
|
514 |
|
|
</p>
|
515 |
|
|
|
516 |
2905
|
harris
|
<p class="header">To install metacat LSID support, adjust the LSID-related
|
517 |
|
|
properties in the build.properties files and type:
|
518 |
|
|
<p class="header"><b>ant deploy-lsid</b>
|
519 |
|
|
<p class="header">
|
520 |
|
|
<h2>SQL Scripts</h2></p>
|
521 |
878
|
berkley
|
<p>
|
522 |
1827
|
jones
|
You now need to set up the table structure in your database. You can do
|
523 |
|
|
either do this using the ant build system, or by manually running the
|
524 |
|
|
scripts using a sql utility.
|
525 |
|
|
</p>
|
526 |
2182
|
jones
|
<p><b>WARNING: Do NOT run this on an existing metacat installation as it
|
527 |
|
|
will delete all of your data. If you have an existing metacat installation,
|
528 |
|
|
see the instructions for "Upgrading" below.</b></p>
|
529 |
|
|
|
530 |
|
|
<p>To run the scripts using ant, type <code>ant installdb</code>. This does
|
531 |
|
|
not work for postgres, so you'll need to run the xmltables-postgres.sql script
|
532 |
|
|
manually (see next paragraph).
|
533 |
1827
|
jones
|
</p>
|
534 |
|
|
<p>To run the scripts manually, change to the
|
535 |
2302
|
costa
|
metacat/build/src directory. Then run you RDBMS's SQL utility. In Oracle it is
|
536 |
878
|
berkley
|
SQLPlus. This tutorial assumes an Oracle database so this example is for
|
537 |
|
|
SQLPlus. Login as the oracle user that was set up for use with Metacat.
|
538 |
1770
|
tao
|
At the SQLPlus prompt type the following: <pre><b>@xmltables.sql;</b></pre>
|
539 |
2182
|
jones
|
For postgres, use a command like:
|
540 |
|
|
<code>psql -U metacat -W -h localhost -f build/src/xmltables-postgres.sql metacat</code>
|
541 |
1827
|
jones
|
</p>
|
542 |
|
|
<p>Either way,
|
543 |
|
|
you should see a bunch of output showing the creation of the Metacat table
|
544 |
878
|
berkley
|
space. The first time you run this script you will get several errors at the
|
545 |
|
|
beginning saying that you cannot drop a table/index/trigger because it
|
546 |
|
|
does not exist. This is normal. Any other errors besides this need to be
|
547 |
1770
|
tao
|
resolved before continuing. The script file name for PostgreSQL is
|
548 |
2302
|
costa
|
xmltables-postgres.sql and for Microsoft SQL server is
|
549 |
1827
|
jones
|
xmltables-sqlserver.sql.
|
550 |
878
|
berkley
|
</p>
|
551 |
|
|
<p>
|
552 |
|
|
If the script has run correctly you should be able to type
|
553 |
2309
|
jones
|
<pre>describe xml_documents</pre> and it should show:
|
554 |
878
|
berkley
|
<pre>
|
555 |
|
|
Name Null? Type
|
556 |
|
|
-------------- ------------ ----------------
|
557 |
|
|
DOCID NOT NULL VARCHAR2(250)
|
558 |
|
|
ROOTNODEID NUMBER(20)
|
559 |
|
|
DOCNAME VARCHAR2(100)
|
560 |
|
|
DOCTYPE VARCHAR2(100)
|
561 |
|
|
DOCTITLE VARCHAR2(1000)
|
562 |
|
|
USER_OWNER VARCHAR2(100)
|
563 |
|
|
USER_UPDATED VARCHAR2(100)
|
564 |
|
|
SERVER_LOCATION NUMBER(20)
|
565 |
|
|
REV NUMBER(10)
|
566 |
|
|
DATE_CREATED DATE
|
567 |
|
|
DATE_UPDATED DATE
|
568 |
|
|
PUBLIC_ACCESS NUMBER(1)
|
569 |
|
|
UPDATED NUMBER(1)
|
570 |
|
|
</pre>
|
571 |
|
|
</p>
|
572 |
2322
|
jones
|
<p class="header"><h2>Registering schemas and DTDs</h2></p>
|
573 |
|
|
<p>Once the tables have been created, you should also register the Ecological
|
574 |
|
|
Metadata Language (EML) DTDs and schemas. <b>However, note that you should
|
575 |
|
|
NOT do this if you are upgrading an existing installation -- the upgrade
|
576 |
|
|
scripts take care of it for you (see the next section).</b> If you are
|
577 |
|
|
installing new, you can register the schema documents by running:</p>
|
578 |
|
|
<pre><b>ant register-schemas</b></pre>
|
579 |
|
|
<p>This command registers the EML DTDs' and schemas' location in the
|
580 |
|
|
metacat server. Your database username and password have to be set correctly
|
581 |
2324
|
jones
|
for this to work. Also, if for some reason running this script from ant
|
582 |
|
|
does not work, you could instead try running "build/src/loaddtdschema.sql"
|
583 |
|
|
from your sql utility (but be sure to use the version in the 'build' directory
|
584 |
|
|
that has been customized for your installation).
|
585 |
2322
|
jones
|
</p>
|
586 |
1827
|
jones
|
<p class="header"><h2>Upgrading SQL Scripts</h2></p>
|
587 |
|
|
<p>
|
588 |
|
|
If you have an existing metacat installation, you should not run the install
|
589 |
|
|
script because it will replace all of the older tables with new, empty
|
590 |
|
|
copies of the tables. Thus you would lose your data! Instead, you can
|
591 |
|
|
run some upgrade scripts that will change the table structure as needed for
|
592 |
|
|
the new version. If you are skipping versions, run each upgrade script
|
593 |
|
|
for the intermediate versions as well. Currently the upgrade scripts are:
|
594 |
|
|
</p>
|
595 |
|
|
<ul>
|
596 |
2324
|
jones
|
<li>build/src/upgrade-db-to-1.2.sql</li>
|
597 |
|
|
<li>build/src/upgrade-db-to-1.3.sql</li>
|
598 |
|
|
<li>build/src/upgrade-db-to-1.4.sql</li>
|
599 |
2501
|
costa
|
<li>build/src/upgrade-db-to-1.5.sql</li>
|
600 |
1827
|
jones
|
</ul>
|
601 |
|
|
<p>
|
602 |
|
|
So, if you had an existing metacat 1.0 installation and you were upgrading
|
603 |
2501
|
costa
|
to 1.5, you would need to run all four scripts in sequence:
|
604 |
|
|
upgrade-db-to-1.2.sql, upgrade-db-to-1.3.sql,
|
605 |
|
|
upgrade-db-to-1.4.sql, and upgrade-db-to-1.5.sql.
|
606 |
|
|
However, if you were starting from a Metacat 1.4.x
|
607 |
|
|
installation, you would only need to run the upgrade-db-to-1.5.sql script.
|
608 |
|
|
Be sure to use the version of the scripts from the 'build' directory: they
|
609 |
2324
|
jones
|
are customized for your installation in that directory.
|
610 |
1827
|
jones
|
</p>
|
611 |
|
|
</p>
|
612 |
1770
|
tao
|
<h2>Restart Tomcat</h2>
|
613 |
990
|
tao
|
<p>
|
614 |
878
|
berkley
|
Once you have successfully installed Metacat, there is one more step. Tomcat
|
615 |
|
|
(and Apache if you have Tomcat integrated with it) must be restarted. To do
|
616 |
1770
|
tao
|
this, login as the user that runs your tomcat server (often "tomcat"),
|
617 |
|
|
go to $CATALINA_HOME/bin and type:
|
618 |
878
|
berkley
|
<pre>
|
619 |
1770
|
tao
|
./shutdown.sh
|
620 |
|
|
./startup.sh
|
621 |
878
|
berkley
|
</pre>
|
622 |
1770
|
tao
|
In the Tomcat startup messages you should see something in log file like:
|
623 |
878
|
berkley
|
<pre>
|
624 |
|
|
MetacatServlet Initialize
|
625 |
|
|
Context log path="/metadata" :Metacat: init
|
626 |
|
|
MetacatServlet Initialize
|
627 |
|
|
</pre>
|
628 |
|
|
If you see that message Tomcat is successfully loading the Metacat servlet.
|
629 |
|
|
Next, try to run your new servlet. Go to a web browser and type:
|
630 |
932
|
jones
|
<pre>http://yourserver.yourdomain.com/yourcontext/</pre>
|
631 |
|
|
You should substitute your context name for "yourcontext" in the url above.
|
632 |
878
|
berkley
|
If everything is working correctly, you should see a query page followed
|
633 |
880
|
jones
|
by an empty result set. Note that if you do not have Tomcat integrated with
|
634 |
878
|
berkley
|
Apache you will probably have to type
|
635 |
932
|
jones
|
<pre>http://yourserver.yourdomain.com:8080/yourcontext/</pre>
|
636 |
878
|
berkley
|
</p>
|
637 |
|
|
</td>
|
638 |
|
|
</tr>
|
639 |
|
|
</table>
|
640 |
|
|
|
641 |
|
|
</body>
|
642 |
|
|
</html>
|