Project

General

Profile

1
<!-- 
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: tao $'
9
  *    '$Date: 2008-06-12 10:35:46 -0700 (Thu, 12 Jun 2008) $'
10
  *    '$Revision: 3992 $'
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="./default.css">
21
</head>
22

    
23
<body>
24

    
25
<table class="tabledefault" width="100%">
26
<tr><td rowspan="2"><img src="./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="/" class="toollink"> KNB Home </a></td>
33
  <td><a href="/data.html" class="toollink"> Data </a></td>
34
  <td><a href="/people.html" class="toollink"> People </a></td>
35
  <td><a href="/informatics" class="toollink"> Informatics </a></td>
36
  <td><a href="/biodiversity" class="toollink"> Biocomplexity </a></td>
37
  <td><a href="/education" class="toollink"> Education </a></td>
38
  <td><a href="/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"><h2>***Disclaimer***</h2></p></td>
45
<tr>
46
<td>
47
  <p class="emphasis">
48
   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
</td>
53
</tr>
54
</table>
55

    
56
<table class="tabledefault" width="100%">
57
<td class="tablehead" colspan="2"><p><a name="The Table of Contents"><h2>The Table of Contents</h2></p></td>
58
<tr>
59
<td>
60
  <ul>
61
     <li>
62
         <a HREF="metacatinstall.html#Operating System Specific Instructions">Operating System Specific Instructions</a>
63
      </li>
64
      <li>
65
         <a HREF="metacatinstall.html#Pre-Installation">Pre-Installation</a>
66
      </li>
67
      <li>
68
         <a HREF="metacatinstall.html#Aditional Software Setup">Aditional Software Setup</a>
69
      </li>
70
      <li>
71
         <a HREF="metacatinstall.html#Edit build.properties File">Edit <code>build.properties</code> File</a>
72
      </li>
73
      <li>
74
         <a HREF="metacatinstall.html#Compilation and Installation">Compilation and Installation</a>
75
      </li>
76
        <li>
77
         <a HREF="metacatinstall.html#Upgrade">Compilation and Upgrading Existing Metacat</a>
78
      </li>
79
      <li>
80
        <a href="metacatinstall.html#Registry">Registry</a>
81
      
82
  </ul>
83
</td>
84

    
85
<table class="tabledefault" width="100%">
86
<td class="tablehead" colspan="2"><p><a name="Operating System Specific Instructions"><h2>Operating System Specific Instructions</h2></p></td>
87
<tr>
88
<td>
89
  <p class="emphasis">
90
These documents are meant to outline the metacat installation process on specific platforms. They are <strong><em>not</em></strong> a substitute for the below instructions and only meant as a supplemental guideline. 
91
  </p>
92
  <ul>
93
    <li> <a href="os_specific/install_metacat_windows.html">Installing from CVS source on Windows XP</a> </li>
94
    <li> <a href="os_specific/install_metacat_ubuntu.html">Installing from CVS source on Ubuntu 6.06 (ie Dapper Drake)</a> </li>
95
    <li> <a href="os_specific/install_metacat_mac.html">Installing from CVS source on Mac OS X</a> </li>
96

    
97
  </ul>
98
</td>
99
</tr>
100
</table>
101

    
102

    
103
<table class="tabledefault" width="100%">
104
<td class="tablehead" colspan="2"><p><a name="Pre-Installation"><h2>Pre-Installation</h2></p></td>
105
<tr>
106
<td>
107
  <p class="header">Minimum Requirements</p> 
108
  <p>
109
   Installing Metacat requires a server running an SQL92 compliant database
110
   (Oracle 8i or Postgresql recommended) with at least 128MB RAM, and a Pentium III class
111
   processor or higher.  The amount of disk space required depends on the
112
   size of your RDBMS tablespace (which should be at least 10 MB, 
113
   however Metacat itself requires only about 1 MB of free space after 
114
   installation).  These instructions assume a Linux environment but may
115
   work on other UNIX type environments, however this has not been tested.
116
  </p>
117
  <p class = "header">Additional Required Software</p>
118
  <p>
119
   The server on which you wish to install Metacat must have the following
120
   software installed and running correctly before attempting to install
121
   Metacat.
122
   <ul>
123
     <li><a href="http://www.oracle.com">Oracle 8i</a> (or another SQL92
124
         compliant RDBMS like Postgres)</li>
125
     <li><a href="http://jakarta.apache.org/ant/index.html">Apache Jakarta-Ant</a>
126
     </li>
127
     <li><a href="http://jakarta.apache.org/tomcat/index.html">Apache Jakarta-Tomcat</a>
128
       <p class="emphasis">Note: For a more robust web serving environment, 
129
       Apache web server should
130
       be installed along with Tomcat and the two should be integrated
131
       as described on the Apache web site.</p>
132
     </li>
133
   </ul>
134
  </p>
135
</td>
136
</tr>
137
</table>
138

    
139
<table class="tabledefault" width="100%">
140
<td class="tablehead" colspan="2"><p><a name="Aditional Software Setup"><h2>Aditional Software Setup</h2></p></td>
141
<tr>
142
<td>
143
  <p class="header">Java</p>
144
  <p>You'll need a recent Java SDK; J2SE 1.4.2 or later is required.  The latest metacat release
145
  has been tested most extensively with <a href="http://java.sun.com/j2se/1.5.0/">J2SE 5.0</a>
146
  and this is the recommended version.
147
  Make sure that JAVA_HOME environment variable is properly set and that both
148
  java and javac are on your PATH.
149
  </p>
150
  <p class="header">Oracle 8i or Postgres</p>
151
  <p><i>Oracle:</i><br>
152
   The Oracle RDBMS must be installed and running as a daemon on the system.
153
   In addition the JDBC listener must be enabled.  You can enable it by
154
   logging in as your Oracle user and typing the following:
155
   <pre>lsnrctl start</pre>
156
   Your instance should have a table space of at least 5 MB (10 MB or higher 
157
   recommended).  You should also have a username specific to Metacat
158
   created and enabled.  This user must have most normal permissions 
159
   including CREATE SESSION, CREATE TABLE, CREATE INDEX, CREATE TRIGGER, 
160
   EXECUTE PROCEDURE, EXECUTE TYPE, etc.  If an action is unexplainably 
161
   rejected by Metacat it is probably because the user permissions are not
162
   correctly set.
163
  </p>
164
  <p><i>Postgres:</i><br>
165
  Postgres can be easily installed on most linux distributions and on
166
  Windows (using cygwin) and Mac OS X.  Using Fedora Core or RedHat Linux,
167
  you can install the rpms for postgres and then run 
168
  <code>/etc/init.d/postgresql start</code> in order to start the database. 
169
  On Ubuntu and other Debian-based Linux distributions, you can use the apt-get command
170
  to install postgres: <code>sudo apt-get install postgresql-8.0</code> and 
171
  then run <code>/etc/init.d/postgresql-8.0 start</code> to start.
172
  
173
  This initializes the data files.  You need to do a bit of configuration
174
  to create a database and set up a user account and allow internet access
175
  via jdbc.  See the postgres documentation for this, but here is a quick 
176
  start:
177
  <ul>
178
     <li>Switch to the "postgres" user account and edit "data/pg_hba.conf", adding the following line to the file:<br>
179
     <code>host   metacat  metacat      127.0.0.1         255.255.255.255   password</code><br>
180
     If your host uses IPv6 addresses, you may need this line instead:
181
     <code>host   metacat  metacat      ::1               ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff password</code></li>
182
     <li>If you are using Postgresql pre-8.0, you must edit the "data/postgres.conf" file and uncomment and edit the line
183
     starting with "tcpip_socket" so that it reads 
184
     <code>tcpip_socket = true</code></li>
185
     <li>Run <code>createdb metacat</code> to create a new database</li>
186
     <li>Run <code>psql metacat</code> to log in using the postgres account and create a new "metacat" user account
187
     <ul>
188
        <li>In postgres, run <code>CREATE USER metacat WITH UNENCRYPTED PASSWORD 'apasswordyoulike';</code></li>
189
        <li>This creates a new account called metacat on the database named metacat</li>
190
        <li>Note: there are many ways to do this, so others such as using 
191
        ENCRYPTED passwords will work fine.</li>
192
     </ul>
193
     </li>
194
     <li>Exit the postgres account back to root and restart the postgres 
195
     database with <code>/etc/init.d/postgresql restart</code></li>
196
     <li>Test logging into the postgres db using the metacat account with 
197
     the following command: 
198
     <code>psql -U metacat -W -h localhost metacat</code></li>
199
  </ul>
200
  </p>
201
  <p class="header">Ant</p>
202
  <p>
203
   Ant is a Java based build application similar to Make on UNIX systems.  
204
   It takes in installation parameters from a file in the root installation
205
   directory named "build.xml".  The Metacat CVS module contains a default
206
   build.xml file that may require some modification upon installation.  Ant
207
   should be installed on the system and the "ant" executable shell script 
208
   should be available in the users path. The latest metacat release was tested with 
209
   Ant 1.6.5. <!-- We note that the current build is 
210
   not working with Ant 1.6.x, so you'll need to use an earler version.  We have 
211
   successfully used Ant 1.5.1, 1.5.2, and some earlier versions. -->
212
  </p>
213
  <p class="header">Tomcat</p>
214
  <p>
215
    Install Tomcat into the directory of your choice. The directory in which 
216
    you install Tomcat itself will be referred to as the "$CATALINA_HOME".
217
    We recommend that you install Tomcat version 5.5.  More details about 
218
    Tomcat installation are available <a href=" http://jakarta.apache.org/tomcat/index.html">here</a>.
219
  </p>
220
 </td>
221
</tr>
222
</table>
223

    
224
<table class="tabledefault" width="100%">
225
<td class="tablehead" colspan="2"><p><a name="Edit build.properties File"><h2>Edit <code>build.properties</code> File</h2></p></td>
226
<tr>
227
<td>
228
  <p>
229
   Once all of the prerequisite software is installed as described above, 
230
   the installation of Metacat can begin.  First you must have a current
231
   version of the source distribution of Metacat.  You can get it two ways.
232
   Authorized users can check it out of the NCEAS 
233
   <a href="http://www.nceas.ucsb.edu/cgi-bin/cvsweb.cgi/xmltodb/">CVS</a>
234
   system. You'll need both the "metacat" module and the "utilities" module to
235
   be checked out in sibling directories. The command is as follows: 
236
   <pre>mkdir knb-software</pre>
237
   <pre>cd knb-software</pre>
238
   <pre>cvs checkout -P metacat</pre>
239
   <pre>cvs checkout -P utilities</pre>  
240
   Or you can 
241
   <a href="/software/download.html">download</a> a gzipped tar file
242
   from this site.
243
  </p>
244
   <p>
245
   Once you have either checked out or unzipped and untarred the source
246
   distribution, you can begin the installation process.  Change into the 
247
   metacat directory and edit the file called "<code>build.properties</code>".  You will need 
248
   to change a number of configuration properties to match the setup on
249
   your system. The property values that you will likely need to change are described in 
250
   detail in the following table:
251
  </p>
252
  <br/>
253
  <table border="1">
254
    <tr>
255
      <td><b>Property</b></td>
256
      <td><b>Description</b></td>
257
      <td><b>Default value and examples of other values</b></td>
258
    </tr>
259
    <tr>
260
      <td>tomcat</td>
261
      <td>The tomcat property is the location in which tomcat is installed.</td>
262
      <td>Default:&nbsp;&nbsp;
263
          <code>/usr/local/devtools/jakarta-tomcat</code>
264
      <br><br>Example:&nbsp;&nbsp;
265
          <code>C:/Tomcat-5.5</code></td>
266
    </tr>
267
    <tr>
268
      <td>deploy.dir</td>
269
      <td>The deploy.dir property is the location in which your tomcat servlet 
270
          contexts are deployed. This is typically "${tomcat}/webapps",
271
          where ${tomcat} is the same value that you entered for the 'tomcat'
272
          property above.
273
      </td>
274
      <td>Default:&nbsp;&nbsp;
275
          <code>/var/www/org.ecoinformatics.knb</code>
276
      <br><br>Example:&nbsp;&nbsp;
277
          <code>C:/Tomcat-5.5/webapps</code>
278
      </td>
279
    </tr>
280
    <tr>
281
      <td>tomcatversion</td>
282
      <td>The tomcatversion property is the version of Tomcat in which you 
283
          want Metacat to run. This will determine the location of some
284
          jar files coming with Tomcat. 
285
          <p>
286
            <em>Note: Tomcat 3 and 4 are no longer tested or supported by Metacat.
287
                Users are highly encouraged to upgrade to Tomcat 5.5.
288
            </em>
289
          </p>
290
          <p>
291
            <em>Also note: a property value of 'tomcat5' can be set when using
292
                either Tomcat 5.0 or Tomcat 5.5.
293
            </em>
294
          </p>
295
      </td>
296
      <td>Default:&nbsp;&nbsp;
297
          <code>tomcat5</code>
298
      <br><br>Other possible values (deprecated):&nbsp;&nbsp;
299
          <code>tomcat3 tomcat4</code>
300
      </td>
301
      </td>
302
    </tr>
303
    <tr>
304
      <td>metacat.context</td>
305
      <td>The metacat.context property is the name of the servlet context in which you 
306
          want Metacat to be installed. This will determine the installation 
307
          directory for the servlet and many of the URLs that are used to access
308
          the installed Metacat server.</td>
309
      <td>Default:&nbsp;&nbsp;
310
          <code>knb</code>
311
      <br><br>Example:&nbsp;&nbsp;
312
          <code>mycontext</code>
313
      </td>
314
    </tr>
315
    <tr>
316
      <td>config.hostname</td>
317
      <td>The config.hostname property is the hostname of the server on which Metacat is 
318
          running (note that you should not include the 'http://' in the config.hostname
319
          property).
320
      </td>
321
      <td>Default:&nbsp;&nbsp;
322
         <code>knb.ecoinformatics.org</code>
323
      <br><br>Example:&nbsp;&nbsp;
324
         <code>somehost.university.edu</code>
325
      </td>
326
    </tr>
327
    <tr>
328
      <td>config.port</td>
329
      <td>The config.port property is the HTTP plain port number that is used to connect to Metacat.
330
          If Tomcat is running stand-alone, the value will typically be 8080.</td>
331
      <td>Default:&nbsp;&nbsp;
332
          <code>80</code>
333
      <br><br>Example:&nbsp;&nbsp;
334
          <code>8080</code>
335
      </td>
336
    </tr>
337
    <tr>
338
      <td>config.port.https</td>
339
      <td>The config.port.https property is the HTTP secure port number that is used to connect to Metacat,
340
          generally when replicating documents to and from other Metacat servers.
341
          If Tomcat is running stand-alone, the value will typically be 8443.</td>
342
      <td>Default:&nbsp;&nbsp;
343
          <code>443</code>
344
      <br><br>Example:&nbsp;&nbsp;
345
          <code>8443</code>
346
      </td>
347
    </tr>
348
    <tr>
349
      <td>ldapUrl</td>
350
      <td>URL to the LDAP server. The LDAP server is used in the default
351
          authentication module to authenticate and identify users of the
352
          system.  To participate in the KNB network, you should leave this at
353
          the default.  But it can be changed if you want to use a 
354
          different directory of users.
355
      </td>
356
      <td>Default:&nbsp;&nbsp;
357
          <code>ldap://ldap.ecoinformatics.org/dc=ecoinformatics,dc=org</code>
358
      </td>
359
    </tr>
360
    <tr>
361
      <td>database</td>
362
      <td>Select the database to use for metadata storage.
363
          <p>
364
          The build file is preconfigured to install Metacat either using 
365
          Oracle, PostgreSQL, or Microsoft SQL Server as a backend database.  
366
          To change the database system, simply change the value of the 'database' 
367
          property to be the name of the database target that you wish to use.
368
          </p>
369
          <p>
370
          Valid values are <code>oracle</code>, <code>postgresql</code>, or
371
          <code>sqlserver</code>. <em>Note that sqlserver support is minimal and
372
          probably will not work without substantial changes on your part,
373
          possibly including code changes.  We have not recently tested on 
374
          sqlserver.</em>
375
          </p>
376
      </td>
377
      <td>Default:&nbsp;&nbsp;
378
          <code>postgresql</code>
379
      <br><br>Other possible values:&nbsp;&nbsp;
380
          <code>oracle</code>&nbsp;&nbsp;
381
          <code>sqlserver</code>
382
      </td>
383
    </tr>
384
    <tr>
385
      <td>jdbc-connect</td>
386
      <td>The JDBC connection string used to connect to the database.</td>
387
      <td>Default:&nbsp;&nbsp;
388
          <code>jdbc:postgresql://localhost/metacat</code>
389
      <br><br>Example:&nbsp;&nbsp;
390
          <code>jdbc:oracle:thin:@somehost.university.edu:1521:metacat</code>
391
      </td>
392
    <tr>
393
      <td>jdbc-base</td>
394
      <td>The base directory for locating JDBC jar files. When using the postgresql database, the default setting of './lib' can be used,
395
          while oracle and sqlserver databases will require a different setting since these jar files are not included in the Metacat
396
          distribution.</td>
397
      <td>Default:&nbsp;&nbsp;
398
          <code>./lib</code>
399
      <br><br>Example:&nbsp;&nbsp;
400
          <code>/usr/oracle/jdbc/lib</code><br>
401
      </td>
402
    </tr>
403
    <tr>
404
      <td>user</td>
405
      <td>The database user name that you set up to use Metacat.</td>
406
      <td>Default:&nbsp;&nbsp;
407
          <code>metacat</code>
408
      <br><br>Example:&nbsp;&nbsp;
409
          <code>metacatuser</code>
410
      </td>
411
    </tr>
412
    <tr>
413
      <td>password</td>
414
      <td>The database password that you set up to use Metacat.</td>
415
      <td>Default:&nbsp;&nbsp;
416
          <code>yourPasswordHere</code>
417
      <br><br>Example:&nbsp;&nbsp;
418
          <code>metacat123</code>
419
      </td>
420
    </tr>
421
    <tr>
422
      <td>datafilepath</td>
423
      <td>The datafilepath is the directory to store data files.</td>
424
      <td>Default:&nbsp;&nbsp;
425
          <code>/var/metacat/data</code>
426
      <br><br>Example:&nbsp;&nbsp;
427
          <code>C:/Tomcat-5.5/data/metacat/data</code>
428
      </td>
429
    </tr>
430
    <tr>
431
      <td>inlinedatafilepath</td>
432
      <td>The inlinedatafilepath is the directory to store inline data that
433
          has been extracted from EML documents.</td>
434
      <td>Default:&nbsp;&nbsp;
435
          <code>/var/metacat/inline-data</code>
436
      <br><br>Example:&nbsp;&nbsp;
437
          <code>C:/Tomcat-5.5/data/metacat/inlinedata</code>
438
      </td>
439
    </tr>
440
    <tr>
441
      <td>default-style</td>
442
      <td>The default-style parameter defines the "style-set" that is to be used
443
          by default when the qformat parameter is missing or set to "html"
444
          during a query. It is set to "default", which is one of the styles that 
445
          ships with the default metacat distribution. Other possible settings
446
          are shown in the examples to the right.</td>
447
      <td>Default:&nbsp;&nbsp;
448
          <code>default</code>
449
      <br><br>Examples:<code>esa kepler knb knb2 knp lter ltss nceas nrs obfs pisco specnet</code>
450
      </td>
451
    </tr>
452
    <tr>
453
      <td>administrators</td>
454
      <td>The administrators parameter lists the accounts that are allowed to
455
          perform administrative actions such as rebuilding indices for 
456
          documents. The list can contain more than one account separated
457
          by colons.</td>
458
      <td>Default:&nbsp;&nbsp;
459
          <code>uid=jones,o=NCEAS,dc=ecoinformatics,dc=org</code>
460
      <br><br>Examples:&nbsp;&nbsp;
461
          <code>uid=localadmin,o=ucnrs.org</code>
462
      </td>
463
    </tr>
464
	
465
	<!-- start lsid stuff -->
466
	<tr>
467
      <td>authority.context</td>
468
      <td>This is the context for the (Life Sciences Identifier) LSID authority.
469
        LSID support is an optional feature which can be configured to provide
470
        metacat access to LSID clients. For more information on LSID's see <a href="http://wiki.gbif.org/guidwiki/wikka.php?wakka=LSID">TDWG
471
        site</a>.</td>
472
      <td>Default: <code>authority</code></td>
473
    </tr>
474
	<tr>
475
      <td>config.lsidauthority</td>
476
      <td>This is the name of the LSID authority that this metacat should use.
477
        This authority needs to be defined as SRV record in a DNS.</td>
478
      <td><p>Default: <code>ecoinformatics.org</code></p>
479
        <p>Examples: <code>esa.org</code> or <code>sulphur.ecoinformatics.org</code></p></td>
480
    </tr>
481
    <tr>
482
      <td>install.ecogrid</td>
483
      <td>Enables EarthGrid web services. EarthGrid web services are disabled by default. 
484
          To enable EarthGrid web services (including query, put, authentication and 
485
          identifier interface), set this value to <code>true</code>, and also set the value
486
          of the <em>metacat.dir</em> property as detailed below.</td>
487
      <td>
488
          Default:&nbsp;&nbsp;<code>false</code>
489
      </td>
490
    </tr>
491
    <tr>
492
      <td>metacat.dir</td>
493
      <td>If the <em>install.ecogrid</em> property (see above) is set to <code>true</code>, this
494
          property should be set to the absolute path of the top-level metacat directory.
495
          If <em>install.ecogrid</em> is set to <code>false</code> (the default setting), 
496
          the value of <em>metacat.dir</em> is ignored.          
497
      </td>
498
      <td>Default:&nbsp;&nbsp;<code>/home/tao/project/metacat</code></td>
499
    </tr>
500
  </table>
501
   Note: If property "install.ecogrid" is set to be true(EarthGrid is enabled), you need to change the value of "metacatURL" to your metacat url in
502
   seek/projects/ecogrid/conf/MetacatImpl/classes/metacat.properties file.
503
  <br>
504

    
505
  <p>
506
  Other properties in <code>build.properties</code> that you can (but generally need not) change:
507
  </p>
508

    
509
  <table border="1">
510
    <tr>
511
      <td><b>Property</b></td>
512
      <td><b>Description</b></td>
513
      <td><b>Default value and examples of other values</b></td>
514
    </tr>
515
    <tr>
516
      <td>server</td>
517
      <td>The server property is the hostname and port number of the server that Metacat uses
518
          for replicating documents to and from other Metacat servers, which should be with the secure (HTTPS) port.
519
          Since this property is usually composed of the <code>config.hostname</code> and <code>config.port.https</code> properties (described above),
520
          the default setting can be used in most cases.
521
      </td>
522
      <td>Default:&nbsp;&nbsp;<code>${config.hostname}:${config.port.https}</code></td>
523
    </tr>
524
    <tr>
525
      <td>httpserver</td>
526
      <td>httpserver is the plain HTTP address and port number that Metacat uses for purposes
527
          other than replication. Since this property is usually composed of the <code>config.hosthame</code> and <code>config.port</code>
528
          properties (described above), the default setting can be used in most cases.</td>
529
      <td>Default:&nbsp;&nbsp;<code>${config.hostname}:${config.port}</code>
530
      </td>
531
    </tr>
532
    <tr>
533
      <td>http.protocol</td>
534
      <td>http.protocol is the string used in the leading part of a URL to indicate use of the HTTP protocol.</td>
535
      <td>Default:&nbsp;&nbsp;<code>http</code>
536
      </td>
537
    </tr>
538
    <tr>
539
      <td>config.metacatserver</td>
540
      <td>The URL to the metacat server, composed in part from three other properties (http.protocol, httpserver, and metacat.context).</td>
541
      <td>Default:&nbsp;&nbsp;<code>${http.protocol}://${httpserver}/${metacat.context}/metacat</code>
542
      </td>
543
    </tr>
544
    <tr>
545
      <td>inst.cgi.dir</td>
546
      <td>Installation directory for registry CGI scripts</td>
547
      <td>Default:&nbsp;&nbsp;
548
          <code>/var/www/cgi-knb</code>
549
      </td>
550
    </tr>
551
    <tr>
552
      <td>cgi-prefix</td>
553
      <td>The URL used for executing CGI scripts</td>
554
      <td>Default:&nbsp;&nbsp;
555
          <code>http://${httpserver}/cgi-bin</code>
556
      </td>
557
    </tr>
558
    <tr>
559
      <td>cvsroot</td>
560
      <td>CVS access to retrieve latest EML. Only used by
561
          developers in building the release.</td>
562
      <td>Default:&nbsp;&nbsp;
563
          <code><pre>:ext:${env.USER}@cvs.ecoinformatics.org:/cvs</pre></code>
564
          Example:&nbsp;&nbsp;
565
          <code><pre>:ext:myaccount@cvs.ecoinformatics.org:/cvs</pre></code>
566
      </td>
567
    </tr>
568
    <tr>
569
      <td>knb-site-url</td>
570
      <td>This is the URL to the web context root for the knb site. 
571
          It is used for the qformat=knb skin only.</td>
572
      <td>Default:&nbsp;&nbsp;
573
          <code>http://knb.ecoinformatics.org</code>
574
      </td>
575
    </tr>
576
    <tr>
577
      <td>timedreplication</td>
578
      <td>Determines whether timed replication to other metacat servers is being used.</td>
579
      <td>Default:&nbsp;&nbsp;
580
          <code>false</code>
581
      <br><br>Other possible values:&nbsp;&nbsp;
582
          <code>true</code>
583
      </td>
584
    </tr>
585
    <tr>
586
      <td>firsttimedreplication</td>
587
      <td>The time for starting first timed replication if timedreplication is true.
588
          (See comments in build.properties file for additional details.)</td>
589
      <td>Default:&nbsp;&nbsp;
590
          <code>10:00 PM</code>
591
          <code>&nbsp;</code>
592
      </td>
593
    </tr>
594
    <tr>
595
      <td>timedreplicationinterval</td>
596
      <td>The interval to next timed replication if timedreplication is true.
597
          The value is in milliseconds and default value is 48 hours.</td>
598
      <td>Default:&nbsp;&nbsp;
599
          <code>172800000</code>
600
          <code>&nbsp;</code>
601
      </td>
602
    </tr>
603
    <tr>
604
      <td>forcereplicationwaitingtime</td>
605
      <td>The waiting time before replication is forced to begin after
606
          uploading a package. The default value should usually suffice.</td>
607
      <td>Default:&nbsp;&nbsp;
608
          <code>30000</code>
609
          <code>&nbsp;</code>
610
      </td>
611
    </tr>
612
    <tr>
613
      <td>log.dir</td>
614
      <td>The directory where replication log files are to be written by Metacat.</td>
615
      <td>Default:&nbsp;&nbsp;<code>${tomcat}/logs</code></td>
616
    </tr>
617
    <tr>
618
      <td>moderators</td>
619
      <td>Moderator accounts, in a colon-separated list. Specifies a list of special users who can review a general user's submission. 
620
             Moderators can approve, revise and reject the submission after reviewing. This property is only used in the ESA skin.</td>
621
      <td>Default:&nbsp;&nbsp;<code>cn=knb-prod,o=NCEAS,dc=ecoinformatics,dc=org</code></td>
622
    </tr>
623
    <tr>
624
      <td>allowedSubmitters</td>
625
      <td>Specifies the list of users who should be allowed to submit documents. 
626
          If no value is specified (the default setting), all users will be allowed to submit documents.
627
      </td>
628
      <td>Default:&nbsp;&nbsp;(no value)</td>
629
    </tr>
630
    <tr>
631
      <td>deniedSubmitters</td>
632
      <td>Specify the list of users who should not be allowed to submit documents. 
633
          If no value is specified (the default setting), all users will be allowed to submit documents.</td>
634
      <td>Default:&nbsp;&nbsp;(no value)</td>
635
    </tr>
636
    <tr>
637
      <td>config.metadataLabelLsid</td>
638
      <td> </td>
639
      <td>Default:&nbsp;&nbsp;<code>${config.lsidauthority}</code></td>
640
    </tr>
641
    <tr>
642
      <td>build.dir</td>
643
      <td>The name of the subdirectory that is created when metacat is built by the 'ant' tool.</td>
644
      <td>Default:&nbsp;&nbsp;<code>build</code></td>
645
    </tr>
646
    <tr>
647
      <td>lsid.build.dir</td>
648
      <td>The name of the subdirectory for building the LSID component of metacat.</td>
649
      <td>Default:&nbsp;&nbsp;<code>${build.dir}/lsid</code></td>
650
    </tr>
651
    <tr>
652
      <td>lib.dir</td>
653
      <td>The name of the subdirectory where library (.jar) files and a number of other important files are located.</td>
654
      <td>Default:&nbsp;&nbsp;<code>lib</code></td>
655
    </tr>
656
    <tr>
657
      <td>lsid.lib.dir</td>
658
      <td>The name of the subdirectory where LSID library (.jar) files are located.</td>
659
      <td>Default:&nbsp;&nbsp;<code>${lib.dir}/lsid_lib</code></td>
660
    </tr>
661
    <tr>
662
      <td>lsid.classes.dir</td>
663
      <td>The relative path to the location of Java classes that support LSID.</td>
664
      <td>Default:&nbsp;&nbsp;<code>edu/ucsb/nceas/metacat/lsid</code></td>
665
    </tr>
666
    <tr>
667
      <td>conf.dir</td>
668
      <td>The name of the directory where LSID configuration files are located.</td>
669
      <td>Default:&nbsp;&nbsp;<code>lib/lsid_conf</code></td>
670
    </tr>
671
    <tr>
672
      <td>services.dir</td>
673
      <td>The name of the directory where LSID services configuration files are located.</td>
674
      <td>Default:&nbsp;&nbsp;<code>${conf.dir}/services</code></td>
675
    </tr>
676
    <tr>
677
      <td>webinf.dir</td>
678
      <td>The name of the directory where additional LSID web services files are located.</td>
679
      <td>Default:&nbsp;&nbsp;<code>${conf.dir}/WEB-INF</code></td>
680
    </tr>
681
    <tr>
682
      <td>compile.debug</td>
683
      <td>Indicates whether Java source should be compiled with debug information.</td>
684
      <td>Default:&nbsp;&nbsp;<code>true</code></td>
685
    </tr>
686
    <tr>
687
      <td>compile.deprecation</td>
688
      <td>Indicates whether Java source should be compiled with deprecation information.</td>
689
      <td>Default:&nbsp;&nbsp;<code>false</code></td>
690
    </tr>
691
    <tr>
692
      <td>compile.optimize</td>
693
      <td>Indicates whether Java source should be compiled with optimization.</td>
694
      <td>Default:&nbsp;&nbsp;<code>true</code></td>
695
    </tr>
696
    <tr>
697
      <td>indexPaths</td>
698
      <td>The <em>indexPaths</em> property specifies a comma-separated (potentially long) list 
699
          of indexed paths that can be utilized to improve the
700
          performance of metacat queries. Each component of the <em>indexPaths</em> property
701
          should specify an absolute or relative path (using an XPath-like syntax) to an XML element or 
702
          attribute present in the XML documents being queried. Metacat stores XML 
703
          element and attribute values for indexed paths in a special database table 
704
          that optimizes search performance.
705
          <p>Metacat queries allow you to specify (using the &lt;pathexpr&gt; tag in search query) 
706
          an exact path to which you want
707
          to restrict the search. When the &lt;pathexpr&gt; path that is specified in the query
708
          is a member of the <em>indexPaths</em> list, search results are returned faster 
709
          because metacat can conduct its search using the optimized database table.
710
          <p>
711
          The default value for the <em>indexPaths</em> property contains numerous paths to EML
712
          elements and attributes that are commonly queried by metacat search tools. 
713
          For example, <em>keyword</em> is a
714
          member of this list because it is common for search tools to query
715
          the <em>keyword</em> field in EML documents. For most purposes, the default value will
716
          optimize various types of searches on EML documents and need not be changed.
717
          <p>
718
          For more information about metacat queries, 
719
          see <a href="./metacatquery.html">Queries and Results</a>.
720
      </td>
721
      <td>Default:&nbsp;&nbsp;<code>organizationName,originator/individualName/surName,...</code></td>
722
    </tr>
723
  </table>
724
  <p>
725
  Metacat has a number of additional settable properties in file
726
  <code>lib/metacat.properties</code>. Under most circumstances,
727
  you will not need to modify this file because the properties of interest
728
  to you can be controlled by editing <code>build.properties</code> as
729
  described above. To learn more about Metacat's additional properties,
730
  see <a href="./properties.html">Metacat Properties File</a>.
731
  </p>
732
  <p class="emphasis">
733
   Note: When setting properties, DO NOT add a trailing slash [/] to the end of any paths that are specified.
734
   Metacat will not function correctly if you do so.
735
  </p>
736

    
737
</td>
738
</tr>
739
</table>
740

    
741
<table class="tabledefault" width="100%">
742
<td class="tablehead" colspan="2"><p><a name="Compilation and Installation"><h2>Compilation and Installation</h2></p></td>
743
<tr>
744
<td>
745
  <a name="protocol"></a>
746
  <p>This section is only for a fresh installation. If you are upgrading an existing Metacat, please skip
747
  this section and go to the next one -  <a HREF="metacatinstall.html#Upgrade">Compilation and Upgrading Existing Metacat</a>
748
  <p>    
749
  <h3>Run Ant Build</h3></p>
750
  <p>
751
   Ant allows compilation and installation to be done in one step.
752
   Change into the metacat directory and type: 
753
   <pre><b>ant install</b></pre>
754
   <p>
755
   You should see a bunch of messages telling you the progress of compilation
756
   and installation.  When it is done you should see the message 
757
   BUILD SUCCESSFUL
758
   and you should be returned to a UNIX command prompt.  If you do not see
759
   the message BUILD SUCCESSFUL then there was an error that you need to 
760
   resolve.
761
   This may come up if you are logged in as a user that does not have write
762
   access to one or more of the directories that are listed in the build.xml
763
   file, or if any of the paths to files are not configured correctly in the
764
   "config" target.
765
  </p>
766
  <p>
767
  Note: The 'data' directories that are indicated in the 'datafilepath' and
768
  'inlinedatafilepath' build properties must be writable
769
  by user account under which Tomcat runs or you will not be able to upload 
770
  data files to the system.
771
  </p>
772

    
773
  <p class="header">To install metacat LSID support, adjust the LSID-related
774
    properties in the build.properties files and type:
775
  <p class="header"><b>ant deploy-lsid</b>
776
  <p>    
777
  <h3>SQL Scripts</h3></p>
778
  <p>
779
   You now need to set up the table structure in your database.  You can 
780
   do this either using the ant build system, or by manually running the
781
   scripts using a sql utility.
782
  </p>
783
  <p><b>WARNING: Do NOT run this on an existing metacat installation as it
784
  will delete all of your data.  If you have an existing metacat installation,
785
  see the instructions for <a HREF="metacatinstall.html#Upgrade">"Compilation and Upgrading Existing Metacat"</a> below.</b></p>
786

    
787
  <p>To run the scripts using ant, type
788
   <pre><b>ant installdb</b></pre> 
789
  </p>
790
  <p>To run the scripts manually, change to the
791
   metacat/build/src directory.  Then run you RDBMS's SQL utility.  In Oracle it is
792
   SQLPlus.  This tutorial assumes an Oracle database so this example is for
793
   SQLPlus.  Login as the oracle user that was set up for use with Metacat.
794
   At the SQLPlus prompt type the following: <pre><b>@xmltables.sql;</b></pre>
795
   For postgres, use a command like: 
796
   <code>psql -U metacat -W -h localhost -f build/src/xmltables-postgres.sql metacat</code>
797
  </p>
798
  <p>Either way, 
799
   you should see a bunch of output showing the creation of the Metacat table
800
   space. The first time you run this script you will get several errors at the 
801
   beginning saying that you cannot drop a table/index/trigger because it 
802
   does not exist.  This is normal.  Any other errors besides this need to be
803
   resolved before continuing. The script file name for PostgreSQL is 
804
   xmltables-postgres.sql and for Microsoft SQL server is 
805
   xmltables-sqlserver.sql.
806
  </p>
807
  <p>
808
   If the script has run correctly you should be able to type 
809
   <pre>describe xml_documents</pre> and it should show:
810
   <pre>
811
    Name            Null?         Type
812
    --------------  ------------  ---------------- 
813
     DOCID          NOT NULL      VARCHAR2(250)
814
     ROOTNODEID                   NUMBER(20)
815
     DOCNAME                      VARCHAR2(100)
816
     DOCTYPE                      VARCHAR2(100)
817
     DOCTITLE                     VARCHAR2(1000)
818
     USER_OWNER                   VARCHAR2(100)
819
     USER_UPDATED                 VARCHAR2(100)
820
     SERVER_LOCATION              NUMBER(20)
821
     REV                          NUMBER(10)
822
     DATE_CREATED                 DATE
823
     DATE_UPDATED                 DATE
824
     PUBLIC_ACCESS                NUMBER(1)
825
     UPDATED                      NUMBER(1)
826
   </pre>
827
  </p>
828
  <p><h3>Register schemas and DTDs</h3></p>
829
  <p>Once the tables have been created, you should also register the Ecological
830
  Metadata Language (EML) DTDs and schemas. <b>However, note that you should 
831
  NOT do this if you are upgrading an existing installation -- the upgrade
832
  scripts take care of it for you (see the next section).</b>  If you are
833
  installing new, you can register the schema documents by running:</p>
834
  <pre><b>ant register-schemas</b></pre> 
835
  <p>This command registers the EML DTDs' and schemas' location in the 
836
  metacat server.  Your database username and password have to be set correctly
837
  for this to work.  Also, if for some reason running this script from ant
838
  does not work, you could instead try running "build/src/loaddtdschema.sql"
839
  from your sql utility (but be sure to use the version in the 'build' directory
840
  that has been customized for your installation).
841
  </p>
842
  <h3>Restart Tomcat</h3>
843
  <p>
844
   Once you have successfully installed Metacat, there is one more step.  Tomcat
845
   (and Apache if you have Tomcat integrated with it) must be restarted.  To do
846
   this, login as the user that runs your tomcat server (often "tomcat"),
847
   go to $CATALINA_HOME/bin and type:
848
   <pre>
849
   <b>
850
   ./shutdown.sh 
851
   ./startup.sh
852
   </b> 
853
   </pre>
854
   In the Tomcat startup messages you should see something in the log file like:
855
   <pre>
856
	Metacat: [WARN]: Metacat (1.8.1) initialized. [edu.ucsb.nceas.metacat.MetaCatServlet]
857
   </pre>
858
   If you see that message Tomcat is successfully loading the Metacat servlet.
859
   Next, try to run your new servlet.  Go to a web browser and type:
860
   <pre>http://yourserver.yourdomain.com/yourcontext/</pre>
861
   You should substitute your context name for "yourcontext" in the url above.
862
   If everything is working correctly, you should see a query page followed
863
   by an empty result set.  Note that if you do not have Tomcat integrated with
864
   Apache you will probably have to type
865
   <pre>http://yourserver.yourdomain.com:8080/yourcontext/</pre>
866
  </p>
867
  <p><b>Troubleshooting</b>: If you see something like java.lang.InternalError: 
868
  Can't connect to X11 window server using 'yourservanme:0.0' as the value of the DISPLAY variable.
869
  <p>You should add this line: 
870
  <b>JAVA_OPTS="-Djava.awt.headless=true $JAVA_OPTS"</b> at the first line of
871
  catalina.sh file in tomcat bin directory. The reason is that GeoServer uses X11 windows to draw graphics.
872
  </p>
873
  
874
  <h3>Deploy wsdl file (Only for EarthGrid-enabled Metacat installation) </h3>
875
  <p>
876
   Once Tomcat is running successfully, there is another step for EarthGrid-enabled Metacat installation. 
877
   In metacat directory, type:
878
   <pre><b>ant deploy-ecogrid</b></pre> 
879
   It will generate wsdl files for EarthGrid services.
880
   </p>
881

    
882
</td>
883
</tr>
884
</table>
885

    
886
<table class="tabledefault" width="100%">
887
<td class="tablehead" colspan="2"><p><a name="Upgrade"><h2>Compilation and Upgrading Existing Metacat</h2></p></td>
888
<tr>
889
<td>
890
  <a name="protocol"></a>
891
  <p>The following instructions are for upgrading an existing Metacat.
892
  <p><h3>Stop the running Metacat</h3>
893
   <P>To do this, login as the user that runs your tomcat server (often "tomcat"),
894
   go to $CATALINA_HOME/bin and type:
895
   <pre><b>./shutdown.sh</b> </pre>
896
  <p>    
897
  <h3>Run Ant Build</h3>
898
  <p>
899
   Ant allows compilation and upgrading to be done in one step.
900
   Change into the metacat directory and type: 
901
   <pre><b>ant clean upgrade</b></pre>
902
   <p>
903
   You should see a bunch of messages telling you the progress of compilation
904
   and installation.  When it is done you should see the message 
905
   BUILD SUCCESSFUL
906
   and you should be returned to a UNIX command prompt.  If you do not see
907
   the message BUILD SUCCESSFUL then there was an error that you need to 
908
   resolve.
909
   This may come up if you are logged in as a user that does not have write
910
   access to one or more of the directories that are listed in the build.xml
911
   file, or if any of the paths to files are not configured correctly in the
912
   "config" target.
913
  </p>
914
  <p>
915
  Note: The 'data' directories that are indicated in the 'datafilepath' and
916
  'inlinedatafilepath' build properties must be writable
917
  by user account under which Tomcat runs or you will not be able to upload 
918
  data files to the system.
919
  </p>
920

    
921
  <p class="header">To install metacat LSID support, adjust the LSID-related
922
    properties in the build.properties files and type:
923
  <p class="header"><b>ant deploy-lsid</b>
924
 
925
  <p><h3>Upgrade SQL Scripts</h3></p>
926
  <P>Note: there is no SQL script that needs to be run when user upgrades the Metacat
927
         from 1.8.0 to 1.8.1 release.</p>
928
  <p>
929
    If you have an existing metacat installation, you should not run the install
930
    script because it will replace all of the older tables with new, empty 
931
    copies of the tables.  Thus you would lose your data!  Instead, you can 
932
    run some upgrade scripts that will change the table structure as needed for
933
    the new version.  If you are skipping versions, run each upgrade script
934
    for the intermediate versions as well.  Currently the upgrade scripts are:
935
   </p>
936
    <ul>
937
      <li>build/src/upgrade-db-to-1.2.sql</li>
938
      <li>build/src/upgrade-db-to-1.3.sql</li>
939
      <li>build/src/upgrade-db-to-1.4.sql</li>
940
      <li>build/src/upgrade-db-to-1.5.sql</li>
941
      <li>build/src/upgrade-db-to-1.6.sql</li>
942
      <li>build/src/upgrade-db-to-1.7.sql</li>
943
      <li>build/src/upgrade-db-to-1.8.sql</li>
944
    </ul>
945
   <p>
946
    For example, if you had an existing metacat 1.5 installation and you were upgrading 
947
    to metacat 1.8, you would need to run three scripts in sequence:
948
    upgrade-db-to-1.6.sql, upgrade-db-to-1.7.sql, and upgrade-db-to-1.8.sql. 
949
    However, if you were starting from a Metacat 1.7
950
    installation, you would only need to run the upgrade-db-to-1.8.sql script.
951
    <em>Be sure to use the version of the scripts from the 'build/src' directory: they
952
    are customized for your installation in that directory.</em>
953
   </p>
954
   <p>
955
    Ant targets exist to do the upgrades, so you can also do the above described upgrade by running:<br />
956
   </p>
957
   <p>
958
	<strong>ant upgrade16</strong><br />
959
	<strong>ant upgrade17</strong><br />
960
	<strong>ant upgrade18</strong><br />
961
   </p>
962

    
963
  </p>
964
  <h3>Restart Tomcat</h3>
965
  <p>
966
   Once you have successfully installed Metacat, there is one more step.  Tomcat
967
   (and Apache if you have Tomcat integrated with it) must be restarted.  To do
968
   this, login as the user that runs your tomcat server (often "tomcat"),
969
   go to $CATALINA_HOME/bin and type:
970
   <pre>
971
   <b>
972
   ./startup.sh
973
   </b> 
974
   </pre>
975
   In the Tomcat startup messages you should see something in the log file like:
976
   <pre>
977
	Metacat: [WARN]: Metacat (1.8.0) initialized. [edu.ucsb.nceas.metacat.MetaCatServlet]
978
   </pre>
979
   If you see that message Tomcat is successfully loading the Metacat servlet.
980
   Next, try to run your new servlet.  Go to a web browser and type:
981
   <pre>http://yourserver.yourdomain.com/yourcontext/</pre>
982
   You should substitute your context name for "yourcontext" in the url above.
983
   If everything is working correctly, you should see a query page followed
984
   by an empty result set.  Note that if you do not have Tomcat integrated with
985
   Apache you will probably have to type
986
   <pre>http://yourserver.yourdomain.com:8080/yourcontext/</pre>
987
  </p>
988
  <p><b>Troubleshooting</b>: If you see something like java.lang.InternalError: 
989
  Can't connect to X11 window server using 'yourservanme:0.0' as the value of the DISPLAY variable.
990
  <p>You should add this line: 
991
  <b>JAVA_OPTS="-Djava.awt.headless=true $JAVA_OPTS"</b> at the first line of
992
  catalina.sh file in tomcat bin directory. The reason is that GeoServer uses X11 windows to draw graphics.
993
  </p>
994
  
995
  <h3>Deploy wsdl file (Only for EarthGrid-enabled Metacat installation) </h3>
996
  <p>
997
   Once Tomcat is running successfully, there is another step for EarthGrid-enabled Metacat installation. 
998
   In metacat directory, type:
999
   <pre><b>ant deploy-ecogrid</b></pre> 
1000
   It will generate wsdl files for EarthGrid services.
1001
   </p>
1002

    
1003
</td>
1004
</tr>
1005
</table>
1006

    
1007
<table class="tabledefault" width="100%">
1008
<td class="tablehead" colspan="2"><a name="Registry"><h2>Web-based Registry for Metacat</h2></td>
1009
<tr>
1010
<td>
1011
<p>The registry allows users to upload simple metadata documents directly from the web.  See the separate 
1012
<a href="registry_installation.html">Registry Installation Guide</a>.</p><br /><br />
1013
</td>
1014
</body>
1015
</html>
(29-29/54)