Project

General

Profile

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 3019 perry
  *    '$Date$'
10
  *    '$Revision$'
11 878 berkley
  *
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 3019 perry
   (Oracle 8i or Postgresql recommended) with at least 128MB RAM, and a Pentium III class
64 878 berkley
   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 3214 costa
   installation).  These instructions assume a Linux environment but may
68 878 berkley
   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 3214 costa
  <p>You'll need a recent Java SDK; J2SE 1.4.2 or later is required.  The latest metacat release
98
  has been tested most extensively with <a href="http://java.sun.com/j2se/1.5.0/">J2SE 5.0</a>
99
  and this is the recommended version.
100 2182 jones
  Make sure that JAVA_HOME environment variable is properly set and that both
101
  java and javac are on your PATH.
102
  </p>
103
  <p class="header">Oracle 8i or Postgres</p>
104
  <p><i>Oracle:</i><br>
105 878 berkley
   The Oracle RDBMS must be installed and running as a daemon on the system.
106
   In addition the JDBC listener must be enabled.  You can enable it by
107
   logging in as your Oracle user and typing the following:
108
   <pre>lsnrctl start</pre>
109
   Your instance should have a table space of at least 5 MB (10 MB or higher
110
   recommended).  You should also have a username specific to Metacat
111
   created and enabled.  This user must have most normal permissions
112
   including CREATE SESSION, CREATE TABLE, CREATE INDEX, CREATE TRIGGER,
113
   EXECUTE PROCEDURE, EXECUTE TYPE, etc.  If an action is unexplainably
114
   rejected by Metacat it is probably because the user permissions are not
115
   correctly set.
116
  </p>
117 2182 jones
  <p><i>Postgres:</i><br>
118
  Postgres can be easily installed on most linux distributions and on
119
  Windows (using cygwin) and Mac OS X.  Using Fedora Core or RedHat Linux,
120
  you can install the rpms for postgres and then run
121 3019 perry
  <code>/etc/init.d/postgresql start</code> in order to start the database.
122
  On Ubuntu and other Debian-based Linux distributions, you can use the apt-get command
123
  to install postgres: <code>sudo apt-get install postgresql-8.0</code> and
124
  then run <code>/etc/init.d/postgresql-8.0 start</code> to start.
125
126 2182 jones
  This initializes the data files.  You need to do a bit of configuration
127
  to create a database and set up a user account and allow internet access
128
  via jdbc.  See the postgres documentation for this, but here is a quick
129
  start:
130
  <ul>
131
     <li>Switch to the "postgres" user account and edit "data/pg_hba.conf", adding the following line to the file:<br>
132 2455 jones
     <code>host   metacat  metacat      127.0.0.1         255.255.255.255   password</code><br>
133
     If your host uses IPv6 addresses, you made need this line instead:
134
     <code>host   metacat  metacat      ::1               ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff password</code></li>
135 3019 perry
     <li>If you are using Postgresql pre-8.0, you must edit the "data/postgres.conf" file and uncomment and edit the line
136 2182 jones
     starting with "tcpip_socket" so that it reads
137
     <code>tcpip_socket = true</code></li>
138
     <li>Run <code>createdb metacat</code> to create a new database</li>
139
     <li>Run <code>psql metacat</code> to log in using the postgres account and create a new "metacat" user account
140
     <ul>
141
        <li>In postgres, run <code>CREATE USER metacat WITH UNENCRYPTED PASSWORD 'apasswordyoulike';</code></li>
142
        <li>This creates a new account called metacat on the database named metacat</li>
143
        <li>Note: there are many ways to do this, so others such as using
144
        ENCRYPTED passwords will work fine.</li>
145
     </ul>
146
     </li>
147
     <li>Exit the postgres account back to root and restart the postgres
148
     database with <code>/etc/init.d/postgresql restart</code></li>
149
     <li>Test logging into the postgres db using the metacat account with
150
     the following command:
151
     <code>psql -U metacat -W -h localhost metacat</code></li>
152
  </ul>
153
  </p>
154 878 berkley
  <p class="header">Ant</p>
155
  <p>
156
   Ant is a Java based build application similar to Make on UNIX systems.
157
   It takes in installation parameters from a file in the root installation
158
   directory named "build.xml".  The Metacat CVS module contains a default
159
   build.xml file that may require some modification upon installation.  Ant
160 932 jones
   should be installed on the system and the "ant" executable shell script
161 3019 perry
   should be available in the users path. The latest metacat release was tested with
162
   Ant 1.6.5. <!-- We note that the current build is
163 2182 jones
   not working with Ant 1.6.x, so you'll need to use an earler version.  We have
164 3019 perry
   successfully used Ant 1.5.1, 1.5.2, and some earlier versions. -->
165 878 berkley
  </p>
166
  <p class="header">Tomcat</p>
167
  <p>
168 2302 costa
    Install Tomcat into the directory of your choice. The directory in which
169 1770 tao
    you install Tomcat itself will be referred to as the "$CATALINA_HOME".
170 3214 costa
    We recommend that you install Tomcat version 5.5.  More details about
171
    Tomcat installation are available <a href=" http://jakarta.apache.org/tomcat/index.html">here</a>.
172 878 berkley
  </p>
173 1770 tao
 </td>
174 878 berkley
</tr>
175
</table>
176
177
<table class="tabledefault" width="100%">
178 1770 tao
<td class="tablehead" colspan="2"></td>
179 878 berkley
<tr>
180
<td>
181
  <p>
182
   Once all of the prerequisite software is installed as described above,
183
   the installation of Metacat can begin.  First you must have a current
184
   version of the source distribution of Metacat.  You can get it two ways.
185
   Authorized users can check it out of the NCEAS
186
   <a href="http://www.nceas.ucsb.edu/cgi-bin/cvsweb.cgi/xmltodb/">CVS</a>
187 2183 jones
   system. You'll need both the "metacat" module and the "utilities" module to
188
   be checked out in sibling directories. The command is as follows:
189
   <pre>mkdir knb-software</pre>
190
   <pre>cd knb-software</pre>
191
   <pre>cvs checkout -P metacat</pre>
192
   <pre>cvs checkout -P utilities</pre>
193
   Or you can
194 878 berkley
   <a href="@server@/software/download.html">download</a> a gzipped tar file
195
   from this site.
196
  </p>
197
  <p>
198 3214 costa
199
  <h2>Edit <code>build.properties</code> File</h2></p>
200
  <p>
201 878 berkley
   Once you have either checked out or unzipped and untarred the source
202
   distribution, you can begin the installation process.  Change into the
203 2302 costa
   metacat directory and edit the file called "<code>build.properties</code>".  You will need
204 932 jones
   to change a number of configuration properties to match the setup on
205 2302 costa
   your system.
206 878 berkley
  </p>
207
  <p>
208 3214 costa
  The properties that you will likely need to change will include:
209
  <ul>
210
  <li><code>tomcat</code></li>
211
  <li><code>deploy.dir</code></li>
212
  <li><code>metacat.context</code></li>
213
  <li><code>config.hostname</code></li>
214
  <li><code>config.port</code></li>
215
  <li><code>config.port.https</code></li>
216
  <li><code>ldapUrl</code></li>
217
  <li><code>database</code></li>
218
  <li><code>jdbc-connect</code></li>
219
  <li><code>jdbc-base</code></li>
220
  <li><code>user</code></li>
221
  <li><code>password</code></li>
222
  <li><code>datafilepath</code></li>
223
  <li><code>inlinedatafilepath</code></li>
224
  <li><code>default-style</code></li>
225
  <li><code>administrators</code></li>
226
  <li><code>authority.context</code></li>
227
  <li><code>config.lsidauthority</code></li>
228
  </ul>
229
230
  Each is described in detail in the following table:
231 878 berkley
  </p>
232 2302 costa
  <br><br>
233
  <table border="1">
234
    <tr>
235
      <td><b>Property</b></td>
236
      <td><b>Description</b></td>
237
      <td><b>Default value and examples of other values</b></td>
238
    </tr>
239
    <tr>
240
      <td>tomcat</td>
241
      <td>The tomcat property is the location in which tomcat is installed.</td>
242
      <td>Default:&nbsp;&nbsp;
243
          <code>/usr/local/devtools/jakarta-tomcat</code>
244
      <br><br>Example:&nbsp;&nbsp;
245 3214 costa
          <code>C:/Tomcat-5.5</code></td>
246 2302 costa
    </tr>
247
    <tr>
248 3214 costa
      <td>deploy.dir</td>
249
      <td>The deploy.dir property is the location in which your tomcat servlet
250
          contexts are deployed. This is typically "${tomcat}/webapps",
251
          where ${tomcat} is the same value that you entered for the 'tomcat'
252 2302 costa
          property above.
253
      </td>
254
      <td>Default:&nbsp;&nbsp;
255
          <code>/var/www/org.ecoinformatics.knb</code>
256
      <br><br>Example:&nbsp;&nbsp;
257 3214 costa
          <code>C:/Tomcat-5.5/webapps</code>
258 2302 costa
      </td>
259
    </tr>
260
    <tr>
261 3214 costa
      <td>metacat.context</td>
262
      <td>The metacat.context property is the name of the servlet context in which you
263 2302 costa
          want Metacat to be installed. This will determine the installation
264
          directory for the servlet and many of the URLs that are used to access
265
          the installed Metacat server.</td>
266
      <td>Default:&nbsp;&nbsp;
267
          <code>knb</code>
268
      <br><br>Example:&nbsp;&nbsp;
269
          <code>mycontext</code>
270
      </td>
271
    </tr>
272
    <tr>
273 3214 costa
      <td>config.hostname</td>
274
      <td>The config.hostname property is the hostname of the server on which Metacat is
275 2302 costa
          running (note that you should not include the 'http://' in the server
276 3214 costa
          property).
277 2309 jones
      </td>
278 2302 costa
      <td>Default:&nbsp;&nbsp;
279
         <code>knb.ecoinformatics.org</code>
280
      <br><br>Example:&nbsp;&nbsp;
281 3214 costa
         <code>somehost.university.edu</code>
282 2302 costa
      </td>
283
    </tr>
284
    <tr>
285 3214 costa
      <td>config.port</td>
286
      <td>The config.port property is the HTTP plain port number that is used to connect to Metacat.
287
          If Tomcat is running stand-alone, the value will typically be 8080.</td>
288 2302 costa
      <td>Default:&nbsp;&nbsp;
289 3214 costa
          <code>80</code>
290 2302 costa
      <br><br>Example:&nbsp;&nbsp;
291 3214 costa
          <code>8080</code>
292 2302 costa
      </td>
293
    </tr>
294
    <tr>
295 3214 costa
      <td>config.port.https</td>
296
      <td>The config.port.https property is the HTTP secure port number that is used to connect to Metacat.
297
          If Tomcat is running stand-alone, the value will typically be 8443.</td>
298
      <td>Default:&nbsp;&nbsp;
299
          <code>80</code>
300
      <br><br>Example:&nbsp;&nbsp;
301
          <code>8443</code>
302
      </td>
303
    </tr>
304
    <tr>
305 2302 costa
      <td>ldapUrl</td>
306 2309 jones
      <td>URL to the LDAP server. The LDAP server is used in the default
307
          authentication module to authenticate and identify users of the
308
          system.  To participate in the KNB network, you should leave this at
309
          the default.  But it can be changed if you want to use a
310
          different directory of users.
311
      </td>
312 2302 costa
      <td>Default:&nbsp;&nbsp;
313
          <code>ldap://ldap.ecoinformatics.org/dc=ecoinformatics,dc=org</code>
314
      </td>
315
    </tr>
316
    <tr>
317
      <td>database</td>
318
      <td>Select the database to use for metadata storage.
319
          Valid values are <code>oracle</code>, <code>postgresql</code>, or
320 3214 costa
          <code>sqlserver</code>. <em>Note that sqlserver support is minimal and
321 2309 jones
          probably will not work without substantial changes on your part,
322 3214 costa
          possibly including code changes.  We have not recently tested on
323
          sqlserver.</em>
324 2302 costa
      </td>
325
      <td>Default:&nbsp;&nbsp;
326 3214 costa
          <code>postgresql</code>
327 2302 costa
      <br><br>Other possible values:&nbsp;&nbsp;
328 3214 costa
          <code>oracle</code>&nbsp;&nbsp;
329 2302 costa
          <code>sqlserver</code>
330
      </td>
331
    </tr>
332
    <tr>
333
      <td>jdbc-connect</td>
334
      <td>The JDBC connection string used to connect to the database.</td>
335
      <td>Default:&nbsp;&nbsp;
336 3214 costa
          <code>jdbc-connect=jdbc:postgresql://localhost/metacat</code>
337
      <br><br>Example:&nbsp;&nbsp;
338
          <code>jdbc:oracle:thin:@somehost.university.edu:1521:metacat</code>
339 2302 costa
      </td>
340
    <tr>
341
      <td>jdbc-base</td>
342 3214 costa
      <td>The base directory for locating JDBC jar files. When using the postgresql database, the default setting of './lib' can be used,
343
          while oracle and sqlserver databases will require a different setting since these jar files are not included in the Metacat
344
          distribution.</td>
345 2302 costa
      <td>Default:&nbsp;&nbsp;
346 3214 costa
          <code>./lib</code>
347 2302 costa
      <br><br>Example:&nbsp;&nbsp;
348 3214 costa
          <code>/usr/oracle/jdbc/lib</code><br>
349 2302 costa
      </td>
350
    </tr>
351
    <tr>
352
      <td>user</td>
353 3214 costa
      <td>The database user name that you set up to use Metacat.</td>
354 2302 costa
      <td>Default:&nbsp;&nbsp;
355 3214 costa
          <code>metacat</code>
356 2302 costa
      <br><br>Example:&nbsp;&nbsp;
357 3214 costa
          <code>metacatuser</code>
358 2302 costa
      </td>
359
    </tr>
360
    <tr>
361
      <td>password</td>
362
      <td>The database password that you set up to use Metacat.</td>
363
      <td>Default:&nbsp;&nbsp;
364
          <code>yourPasswordHere</code>
365
      <br><br>Example:&nbsp;&nbsp;
366
          <code>metacat123</code>
367
      </td>
368
    </tr>
369
    <tr>
370
      <td>datafilepath</td>
371 2309 jones
      <td>The datafilepath is the directory to store data files.</td>
372 2302 costa
      <td>Default:&nbsp;&nbsp;
373
          <code>/var/metacat/data</code>
374
      <br><br>Example:&nbsp;&nbsp;
375 3214 costa
          <code>C:/Tomcat-5.5/data/metacat/data</code>
376 2302 costa
      </td>
377
    </tr>
378
    <tr>
379
      <td>inlinedatafilepath</td>
380 2309 jones
      <td>The inlinedatafilepath is the directory to store inline data that
381
          has been extracted from EML documents.</td>
382 2302 costa
      <td>Default:&nbsp;&nbsp;
383
          <code>/var/metacat/inline-data</code>
384
      <br><br>Example:&nbsp;&nbsp;
385 3214 costa
          <code>C:/Tomcat-5.5/data/metacat/inlinedata</code>
386 2302 costa
      </td>
387
    </tr>
388
    <tr>
389
      <td>default-style</td>
390
      <td>The default-style parameter defines the "style-set" that is to be used
391
          by default when the qformat parameter is missing or set to "html"
392 3214 costa
          during a query. It is set to "default", which is one of the styles that
393 2302 costa
          ships with the default metacat distribution. Other possible settings
394
          are shown in the examples to the right.</td>
395
      <td>Default:&nbsp;&nbsp;
396 3214 costa
          <code>default</code>
397
      <br><br>Examples:<code>esa kepler knb knb2 knp lter ltss nceas nrs obfs pisco specnet</code>
398 2302 costa
      </td>
399
    </tr>
400 2309 jones
    <tr>
401
      <td>administrators</td>
402
      <td>The administrators parameter lists the accounts that are allowed to
403
          perform administrative actions such as rebuilding indices for
404 3214 costa
          documents. The list can contain more than one account separated
405 2309 jones
          by colons.</td>
406
      <td>Default:&nbsp;&nbsp;
407
          <code>uid=jones,o=NCEAS,dc=ecoinformatics,dc=org</code>
408
      <br><br>Examples:&nbsp;&nbsp;
409
          <code>uid=localadmin,o=ucnrs.org</code>
410
      </td>
411
    </tr>
412 2903 harris
413
	<!-- start lsid stuff -->
414
	<tr>
415
      <td>authority.context</td>
416
      <td>This is the context for the (Life Sciences Identifier) LSID authority.
417
        LSID support is an optional feature which can be configured to provide
418
        metacat access to LSID clients. For more information on LSID's see <a href="http://wiki.gbif.org/guidwiki/wikka.php?wakka=LSID">TDWG
419
        site</a>.</td>
420
      <td>Default: authority</td>
421
    </tr>
422
	<tr>
423
      <td>config.lsidauthority</td>
424
      <td>This is the name of the LSID authority that this metacat should use.
425
        This authority needs to be defined as SRV record in a DNS.</td>
426 2905 harris
      <td><p>Default: ecoinformatics.org</p>
427
        <p>Examples: esa.org or sulphur.ecoinformatics.org</p></td>
428 2903 harris
    </tr>
429 2302 costa
  </table>
430
  <br>
431 989 berkley
  <p>
432
   Note that the build file is preconfigured to install Metacat either using
433 2302 costa
   Oracle, PostgreSQL, or Microsoft SQL Server as a backend database.
434
   To change the database system, simply change the value of the 'database'
435
   property to be the name of the database target that you wish to use
436
   (either 'oracle', 'postgresql', or 'sqlserver').
437 989 berkley
  </p>
438 2302 costa
  Other properties in <code>build.properties</code> that you can (but generally need not) change:<br />
439
  <br>
440
  <table border="1">
441
    <tr>
442
      <td><b>Property</b></td>
443
      <td><b>Description</b></td>
444
      <td><b>Default value and examples of other values</b></td>
445
    </tr>
446
    <tr>
447
      <td>inst.cgi.dir</td>
448
      <td>Installation directory for registry CGI scripts</td>
449
      <td>Default:&nbsp;&nbsp;
450
          <code>/var/www/cgi-knb</code>
451
      </td>
452
    </tr>
453
    <tr>
454
      <td>cgi-prefix</td>
455
      <td>&nbsp;</td>
456
      <td>Default:&nbsp;&nbsp;
457 3214 costa
          <code>http://${httpserver}/cgi-bin</code>
458 2302 costa
      </td>
459
    </tr>
460
    <tr>
461 3214 costa
      <td>cvsroot</td>
462
      <td>CVS access to retrieve latest EML. Only used by
463
          developers in building the release.</td>
464
      <td>Default:&nbsp;&nbsp;
465
          <code><pre>:ext:${env.USER}@cvs.ecoinformatics.org:/cvs</pre></code>
466
          Example:&nbsp;&nbsp;
467
          <code><pre>:ext:myaccount@cvs.ecoinformatics.org:/cvs</pre></code>
468
      </td>
469
    </tr>
470
    <tr>
471 2302 costa
      <td>knb-site-url</td>
472
      <td>This is the URL to the web context root for the knb site.
473
          It is used for the qformat=knb skin only.</td>
474
      <td>Default:&nbsp;&nbsp;
475
          <code>http://knb.ecoinformatics.org</code>
476
      </td>
477
    </tr>
478
    <tr>
479 3214 costa
      <td>timedreplication</td>
480
      <td>Determines whether timed replication to other metacat servers is being used.</td>
481
      <td>Default:&nbsp;&nbsp;
482
          <code>false</code>
483
      <br><br>Other possible values:&nbsp;&nbsp;
484
          <code>true</code>
485
      </td>
486
    </tr>
487
    <tr>
488
      <td>firsttimedreplication</td>
489
      <td>The time for starting first timed replication if timedreplication is true.
490
          (See comments in build.properties file for additional details.)</td>
491
      <td>Default:&nbsp;&nbsp;
492
          <code>10:00 PM</code>
493
          <code>&nbsp;</code>
494
      </td>
495
    </tr>
496
    <tr>
497
      <td>timedreplicationinterval</td>
498
      <td>The interval to next timed replication if timedreplication is true.
499
          The value is in milliseconds and default value is 48 hours.</td>
500
      <td>Default:&nbsp;&nbsp;
501
          <code>172800000</code>
502
          <code>&nbsp;</code>
503
      </td>
504
    </tr>
505
    <tr>
506 2302 costa
      <td>forcereplicationwaitingtime</td>
507
      <td>The waiting time before replication is forced to begin after
508
          uploading a package. The default value should usually suffice.</td>
509
      <td>Default:&nbsp;&nbsp;
510
          <code>30000</code>
511
          <code>&nbsp;</code>
512
      </td>
513
    </tr>
514
  </table>
515
  <p>
516
  Metacat has a number of additional settable properties in file
517 3214 costa
  <code>lib/metacat.properties</code>. Under most circumstances,
518 2302 costa
  you will not need to modify this file because the properties of interest
519
  to you can be controlled by editing <code>build.properties</code> as
520
  described above. To learn more about Metacat's additional properties,
521
  see <a href="./properties.html">Metacat Properties File</a>.
522
  </p>
523 878 berkley
  <p class="emphasis">
524 2302 costa
   Note: When setting properties, DO NOT add a trailing slash [/] to the end of any paths that are specified.
525
   Metacat will not function correctly if you do so.
526 878 berkley
  </p>
527 2322 jones
528
</td>
529
</tr>
530
</table>
531
532
<table class="tabledefault" width="100%">
533
<td class="tablehead" colspan="2"><p><h2>Compilation and Installation</h2></p></td>
534
<tr>
535
<td>
536
  <a name="protocol"></a>
537
  <p>
538
   Ant allows compilation and installation to be done in one step.
539
   Change into the metacat directory and type:
540
   <pre><b>ant install</b></pre>
541
   or, if you are upgrading an existing installation, type:
542
   <pre><b>ant clean upgrade</b></pre>
543
   <p>
544
   You should see a bunch of messages telling you the progress of compilation
545
   and installation.  When it is done you should see the message
546
   BUILD SUCCESSFUL
547
   and you should be returned to a UNIX command prompt.  If you do not see
548
   the message BUILD SUCCESSFUL then there was an error that you need to
549
   resolve.
550
   This may come up if you are logged in as a user that does not have write
551
   access to one or more of the directories that are listed in the build.xml
552
   file, or if any of the paths to files are not configured correctly in the
553
   "config" target.
554
  </p>
555
  <p>
556
  Note: The 'data' directories that are indicated in the 'datafilepath' and
557
  'inlinedatafilepath' build properties must be writeable
558
  by user account under which Tomcat runs or you will not be able to upload
559
  data files to the system.
560
  </p>
561
562 2905 harris
  <p class="header">To install metacat LSID support, adjust the LSID-related
563
    properties in the build.properties files and type:
564
  <p class="header"><b>ant deploy-lsid</b>
565
  <p class="header">
566
  <h2>SQL Scripts</h2></p>
567 878 berkley
  <p>
568 1827 jones
   You now need to set up the table structure in your database.  You can do
569
   either do this using the ant build system, or by manually running the
570
   scripts using a sql utility.
571
  </p>
572 2182 jones
  <p><b>WARNING: Do NOT run this on an existing metacat installation as it
573
  will delete all of your data.  If you have an existing metacat installation,
574
  see the instructions for "Upgrading" below.</b></p>
575
576
  <p>To run the scripts using ant, type <code>ant installdb</code>.  This does
577
  not work for postgres, so you'll need to run the xmltables-postgres.sql script
578
  manually (see next paragraph).
579 1827 jones
  </p>
580
  <p>To run the scripts manually, change to the
581 2302 costa
   metacat/build/src directory.  Then run you RDBMS's SQL utility.  In Oracle it is
582 878 berkley
   SQLPlus.  This tutorial assumes an Oracle database so this example is for
583
   SQLPlus.  Login as the oracle user that was set up for use with Metacat.
584 1770 tao
   At the SQLPlus prompt type the following: <pre><b>@xmltables.sql;</b></pre>
585 2182 jones
   For postgres, use a command like:
586
   <code>psql -U metacat -W -h localhost -f build/src/xmltables-postgres.sql metacat</code>
587 1827 jones
  </p>
588
  <p>Either way,
589
   you should see a bunch of output showing the creation of the Metacat table
590 878 berkley
   space. The first time you run this script you will get several errors at the
591
   beginning saying that you cannot drop a table/index/trigger because it
592
   does not exist.  This is normal.  Any other errors besides this need to be
593 1770 tao
   resolved before continuing. The script file name for PostgreSQL is
594 2302 costa
   xmltables-postgres.sql and for Microsoft SQL server is
595 1827 jones
   xmltables-sqlserver.sql.
596 878 berkley
  </p>
597
  <p>
598
   If the script has run correctly you should be able to type
599 2309 jones
   <pre>describe xml_documents</pre> and it should show:
600 878 berkley
   <pre>
601
    Name            Null?         Type
602
    --------------  ------------  ----------------
603
     DOCID          NOT NULL      VARCHAR2(250)
604
     ROOTNODEID                   NUMBER(20)
605
     DOCNAME                      VARCHAR2(100)
606
     DOCTYPE                      VARCHAR2(100)
607
     DOCTITLE                     VARCHAR2(1000)
608
     USER_OWNER                   VARCHAR2(100)
609
     USER_UPDATED                 VARCHAR2(100)
610
     SERVER_LOCATION              NUMBER(20)
611
     REV                          NUMBER(10)
612
     DATE_CREATED                 DATE
613
     DATE_UPDATED                 DATE
614
     PUBLIC_ACCESS                NUMBER(1)
615
     UPDATED                      NUMBER(1)
616
   </pre>
617
  </p>
618 2322 jones
  <p class="header"><h2>Registering schemas and DTDs</h2></p>
619
  <p>Once the tables have been created, you should also register the Ecological
620
  Metadata Language (EML) DTDs and schemas. <b>However, note that you should
621
  NOT do this if you are upgrading an existing installation -- the upgrade
622
  scripts take care of it for you (see the next section).</b>  If you are
623
  installing new, you can register the schema documents by running:</p>
624
  <pre><b>ant register-schemas</b></pre>
625
  <p>This command registers the EML DTDs' and schemas' location in the
626
  metacat server.  Your database username and password have to be set correctly
627 2324 jones
  for this to work.  Also, if for some reason running this script from ant
628
  does not work, you could instead try running "build/src/loaddtdschema.sql"
629
  from your sql utility (but be sure to use the version in the 'build' directory
630
  that has been customized for your installation).
631 2322 jones
  </p>
632 1827 jones
  <p class="header"><h2>Upgrading SQL Scripts</h2></p>
633
  <p>
634
    If you have an existing metacat installation, you should not run the install
635
    script because it will replace all of the older tables with new, empty
636
    copies of the tables.  Thus you would lose your data!  Instead, you can
637
    run some upgrade scripts that will change the table structure as needed for
638
    the new version.  If you are skipping versions, run each upgrade script
639
    for the intermediate versions as well.  Currently the upgrade scripts are:
640
   </p>
641
    <ul>
642 2324 jones
      <li>build/src/upgrade-db-to-1.2.sql</li>
643
      <li>build/src/upgrade-db-to-1.3.sql</li>
644
      <li>build/src/upgrade-db-to-1.4.sql</li>
645 2501 costa
      <li>build/src/upgrade-db-to-1.5.sql</li>
646 3214 costa
      <li>build/src/upgrade-db-to-1.6.sql</li>
647
      <li>build/src/upgrade-db-to-1.7.sql</li>
648 1827 jones
    </ul>
649
   <p>
650 3214 costa
    For example, if you had an existing metacat 1.4 installation and you were upgrading
651
    to metacat 1.7, you would need to run three scripts in sequence:
652
    upgrade-db-to-1.5.sql, upgrade-db-to-1.6.sql, and upgrade-db-to-1.7.sql.
653
    However, if you were starting from a Metacat 1.6
654
    installation, you would only need to run the upgrade-db-to-1.7.sql script.
655
    <em>Be sure to use the version of the scripts from the 'build/src' directory: they
656
    are customized for your installation in that directory.</em>
657 1827 jones
   </p>
658
  </p>
659 1770 tao
  <h2>Restart Tomcat</h2>
660 990 tao
  <p>
661 878 berkley
   Once you have successfully installed Metacat, there is one more step.  Tomcat
662
   (and Apache if you have Tomcat integrated with it) must be restarted.  To do
663 1770 tao
   this, login as the user that runs your tomcat server (often "tomcat"),
664
   go to $CATALINA_HOME/bin and type:
665 878 berkley
   <pre>
666 1770 tao
   ./shutdown.sh
667
   ./startup.sh
668 878 berkley
   </pre>
669 1770 tao
   In the Tomcat startup messages you should see something in log file like:
670 878 berkley
   <pre>
671
    MetacatServlet Initialize
672
    Context log path="/metadata" :Metacat: init
673
    MetacatServlet Initialize
674
   </pre>
675
   If you see that message Tomcat is successfully loading the Metacat servlet.
676
   Next, try to run your new servlet.  Go to a web browser and type:
677 932 jones
   <pre>http://yourserver.yourdomain.com/yourcontext/</pre>
678
   You should substitute your context name for "yourcontext" in the url above.
679 878 berkley
   If everything is working correctly, you should see a query page followed
680 880 jones
   by an empty result set.  Note that if you do not have Tomcat integrated with
681 878 berkley
   Apache you will probably have to type
682 932 jones
   <pre>http://yourserver.yourdomain.com:8080/yourcontext/</pre>
683 878 berkley
  </p>
684 3164 tao
  <p><b>Troubleshooting</b>: If you see something like java.lang.InternalError:
685
  Can't connect to X11 window server using 'yourservanme:0.0' as the value of the DISPLAY variable.
686
  <p>You should add this line:
687
  <b>JAVA_OPTS="-Djava.awt.headless=true $JAVA_OPTS"</b> at the first line of
688 3214 costa
  catalina.sh file in tomcat bin directory. The reason is that GeoServer uses X11 windows to draw graphics.
689 3164 tao
  </p>
690 3066 perry
691
  <h2> Operating System Specific Instructions </h2>
692
  <p> These documents are meant to outline the metacat installation process on specific platforms. They are <strong><em>not</em></strong> a substitute for the above instructions and only meant as a supplemental guideline. </p>
693
  <ul>
694
    <li> <a href="os_specific/install_metacat_windows.txt">Installing from CVS source on Windows XP</a> </li>
695 3074 perry
    <li> <a href="os_specific/install_metacat_ubuntu.txt">Installing from CVS source on Ubuntu 6.06 (ie Dapper Drake)</a> </li>
696
    <li> <a href="os_specific/install_metacat_mac.txt">Installing from CVS source on Mac OSX (Intel)</a> </li>
697 3066 perry
  </ul>
698 878 berkley
</td>
699
</tr>
700
</table>
701
702
</body>
703
</html>