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: 2007-11-13 16:16:05 -0800 (Tue, 13 Nov 2007) $'
10
  *    '$Revision: 3592 $'
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
   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 class="emphasis">The Table of Contents</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
      
77
  </ul>
78
</td>
79

    
80
<table class="tabledefault" width="100%">
81
<td class="tablehead" colspan="2"><p class="emphasis"><a name="Operating System Specific Instructions">Operating System Specific Instructions</p></td>
82
<tr>
83
<td>
84
  <p class="emphasis">
85
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. 
86
  </p>
87
  <ul>
88
    <li> <a href="os_specific/install_metacat_windows.html">Installing from CVS source on Windows XP</a> </li>
89
    <li> <a href="os_specific/install_metacat_ubuntu.html">Installing from CVS source on Ubuntu 6.06 (ie Dapper Drake)</a> </li>
90
    <li> <a href="os_specific/install_metacat_mac.html">Installing from CVS source on Mac OS X</a> </li>
91

    
92
  </ul>
93
</td>
94
</tr>
95
</table>
96

    
97

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

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

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

    
497
  <br>
498

    
499
  <p>
500
  Other properties in <code>build.properties</code> that you can (but generally need not) change:
501
  </p>
502

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

    
731
</td>
732
</tr>
733
</table>
734

    
735
<table class="tabledefault" width="100%">
736
<td class="tablehead" colspan="2"><p><a name="Compilation and Installation"><h2>Compilation and Installation</h2></p></td>
737
<tr>
738
<td>
739
  <a name="protocol"></a>
740
  <p>
741
   Ant allows compilation and installation to be done in one step.
742
   Change into the metacat directory and type: 
743
   <pre><b>ant install</b></pre>
744
   or, if you are upgrading an existing installation, type:
745
   <pre><b>ant clean upgrade</b></pre>
746
   <p>
747
   You should see a bunch of messages telling you the progress of compilation
748
   and installation.  When it is done you should see the message 
749
   BUILD SUCCESSFUL
750
   and you should be returned to a UNIX command prompt.  If you do not see
751
   the message BUILD SUCCESSFUL then there was an error that you need to 
752
   resolve.
753
   This may come up if you are logged in as a user that does not have write
754
   access to one or more of the directories that are listed in the build.xml
755
   file, or if any of the paths to files are not configured correctly in the
756
   "config" target.
757
  </p>
758
  <p>
759
  Note: The 'data' directories that are indicated in the 'datafilepath' and
760
  'inlinedatafilepath' build properties must be writeable
761
  by user account under which Tomcat runs or you will not be able to upload 
762
  data files to the system.
763
  </p>
764

    
765
  <p class="header">To install metacat LSID support, adjust the LSID-related
766
    properties in the build.properties files and type:
767
  <p class="header"><b>ant deploy-lsid</b>
768
  <p class="header">    
769
  <h2>SQL Scripts</h2></p>
770
  <p>
771
   You now need to set up the table structure in your database.  You can do
772
   either do this using the ant build system, or by manually running the
773
   scripts using a sql utility.
774
  </p>
775
  <p><b>WARNING: Do NOT run this on an existing metacat installation as it
776
  will delete all of your data.  If you have an existing metacat installation,
777
  see the instructions for "Upgrading" below.</b></p>
778

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

    
901
</td>
902
</tr>
903
</table>
904

    
905
</body>
906
</html>
(29-29/53)