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