Project

General

Profile

1
<table class="tabledefault" width="100%">
2
<td class="tablehead" colspan="2"><p><a name="Edit build.properties File"><h2>Edit <code>build.properties</code> File</h2></p></td>
3
<tr>
4
<td>
5
  <p>
6
   Once all of the prerequisite software is installed as described above, 
7
   the installation of Metacat can begin.  First you must have a current
8
   version of the source distribution of Metacat.  You can get it two ways.
9
   Authorized users can check it out of the NCEAS 
10
   <a href="http://www.nceas.ucsb.edu/cgi-bin/cvsweb.cgi/xmltodb/">CVS</a>
11
   system. You'll need both the "metacat" module and the "utilities" module to
12
   be checked out in sibling directories. The command is as follows: 
13
   <pre>mkdir knb-software</pre>
14
   <pre>cd knb-software</pre>
15
   <pre>cvs checkout -P metacat</pre>
16
   <pre>cvs checkout -P utilities</pre>  
17
   Or you can 
18
   <a href="/software/download.html">download</a> a gzipped tar file
19
   from this site.
20
  </p>
21
   <p>
22
   Once you have either checked out or unzipped and untarred the source
23
   distribution, you can begin the installation process.  Change into the 
24
   metacat directory and edit the file called "<code>build.properties</code>".  You will need 
25
   to change a number of configuration properties to match the setup on
26
   your system. The property values that you will likely need to change are described in 
27
   detail in the following table:
28
  </p>
29
  <br/>
30
  <table border="1">
31
    <tr>
32
      <td><b>Property</b></td>
33
      <td><b>Description</b></td>
34
      <td><b>Default value and examples of other values</b></td>
35
    </tr>
36
    <tr>
37
      <td>tomcat</td>
38
      <td>The tomcat property is the location in which tomcat is installed.</td>
39
      <td>Default:&nbsp;&nbsp;
40
          <code>/usr/local/devtools/jakarta-tomcat</code>
41
      <br><br>Example:&nbsp;&nbsp;
42
          <code>C:/Tomcat-5.5</code></td>
43
    </tr>
44
    <tr>
45
      <td>deploy.dir</td>
46
      <td>The deploy.dir property is the location in which your tomcat servlet 
47
          contexts are deployed. This is typically "${tomcat}/webapps",
48
          where ${tomcat} is the same value that you entered for the 'tomcat'
49
          property above.
50
      </td>
51
      <td>Default:&nbsp;&nbsp;
52
          <code>/var/www/org.ecoinformatics.knb</code>
53
      <br><br>Example:&nbsp;&nbsp;
54
          <code>C:/Tomcat-5.5/webapps</code>
55
      </td>
56
    </tr>
57
    <tr>
58
      <td>tomcatversion</td>
59
      <td>The tomcatversion property is the version of Tomcat in which you 
60
          want Metacat to run. This will determine the location of some
61
          jar files coming with Tomcat. 
62
          <p>
63
            <em>Note: Tomcat 3 and 4 are no longer tested or supported by Metacat.
64
                Users are highly encouraged to upgrade to Tomcat 5.5.
65
            </em>
66
          </p>
67
          <p>
68
            <em>Also note: a property value of 'tomcat5' can be set when using
69
                either Tomcat 5.0 or Tomcat 5.5.
70
            </em>
71
          </p>
72
      </td>
73
      <td>Default:&nbsp;&nbsp;
74
          <code>tomcat5</code>
75
      <br><br>Other possible values (deprecated):&nbsp;&nbsp;
76
          <code>tomcat3 tomcat4</code>
77
      </td>
78
      </td>
79
    </tr>
80
    <tr>
81
      <td>metacat.context</td>
82
      <td>The metacat.context property is the name of the servlet context in which you 
83
          want Metacat to be installed. This will determine the installation 
84
          directory for the servlet and many of the URLs that are used to access
85
          the installed Metacat server.</td>
86
      <td>Default:&nbsp;&nbsp;
87
          <code>knb</code>
88
      <br><br>Example:&nbsp;&nbsp;
89
          <code>mycontext</code>
90
      </td>
91
    </tr>
92
    <tr>
93
      <td>config.hostname</td>
94
      <td>The config.hostname property is the hostname of the server on which Metacat is 
95
          running (note that you should not include the 'http://' in the config.hostname
96
          property).
97
      </td>
98
      <td>Default:&nbsp;&nbsp;
99
         <code>knb.ecoinformatics.org</code>
100
      <br><br>Example:&nbsp;&nbsp;
101
         <code>somehost.university.edu</code>
102
      </td>
103
    </tr>
104
    <tr>
105
      <td>config.port</td>
106
      <td>The config.port property is the HTTP plain port number that is used to connect to Metacat.
107
          If Tomcat is running stand-alone, the value will typically be 8080.</td>
108
      <td>Default:&nbsp;&nbsp;
109
          <code>80</code>
110
      <br><br>Example:&nbsp;&nbsp;
111
          <code>8080</code>
112
      </td>
113
    </tr>
114
    <tr>
115
      <td>config.port.https</td>
116
      <td>The config.port.https property is the HTTP secure port number that is used to connect to Metacat,
117
          generally when replicating documents to and from other Metacat servers.
118
          If Tomcat is running stand-alone, the value will typically be 8443.</td>
119
      <td>Default:&nbsp;&nbsp;
120
          <code>443</code>
121
      <br><br>Example:&nbsp;&nbsp;
122
          <code>8443</code>
123
      </td>
124
    </tr>
125
    <tr>
126
      <td><a name="auth.url">auth.url</td>
127
      <td>URL to the LDAP server. The LDAP server is used in the default
128
          authentication module to authenticate and identify users of the
129
          system.  To participate in the KNB network, you should leave this at
130
          the default.  But it can be changed if you want to use a 
131
          different directory of users.
132
      </td>
133
      <td>Default:&nbsp;&nbsp;
134
          <code>ldap://ldap.ecoinformatics.org/dc=ecoinformatics,dc=org</code>
135
      </td>
136
    </tr>
137
    <tr>
138
      <td>database</td>
139
      <td>Select the database to use for metadata storage.
140
          <p>
141
          The build file is preconfigured to install Metacat either using 
142
          Oracle, PostgreSQL, or Microsoft SQL Server as a backend database.  
143
          To change the database system, simply change the value of the 'database' 
144
          property to be the name of the database target that you wish to use.
145
          </p>
146
          <p>
147
          Valid values are <code>oracle</code>, <code>postgresql</code>, or
148
          <code>sqlserver</code>. <em>Note that sqlserver support is minimal and
149
          probably will not work without substantial changes on your part,
150
          possibly including code changes.  We have not recently tested on 
151
          sqlserver.</em>
152
          </p>
153
      </td>
154
      <td>Default:&nbsp;&nbsp;
155
          <code>postgresql</code>
156
      <br><br>Other possible values:&nbsp;&nbsp;
157
          <code>oracle</code>&nbsp;&nbsp;
158
          <code>sqlserver</code>
159
      </td>
160
    </tr>
161
    <tr>
162
      <td>jdbc-connect</td>
163
      <td>The JDBC connection string used to connect to the database.</td>
164
      <td>Default:&nbsp;&nbsp;
165
          <code>jdbc:postgresql://localhost/metacat</code>
166
      <br><br>Example:&nbsp;&nbsp;
167
          <code>jdbc:oracle:thin:@somehost.university.edu:1521:metacat</code>
168
      </td>
169
    <tr>
170
      <td>jdbc-base</td>
171
      <td>The base directory for locating JDBC jar files. When using the postgresql database, the default setting of './lib' can be used,
172
          while oracle and sqlserver databases will require a different setting since these jar files are not included in the Metacat
173
          distribution.</td>
174
      <td>Default:&nbsp;&nbsp;
175
          <code>./lib</code>
176
      <br><br>Example:&nbsp;&nbsp;
177
          <code>/usr/oracle/jdbc/lib</code><br>
178
      </td>
179
    </tr>
180
    <tr>
181
      <td>user</td>
182
      <td>The database user name that you set up to use Metacat.</td>
183
      <td>Default:&nbsp;&nbsp;
184
          <code>metacat</code>
185
      <br><br>Example:&nbsp;&nbsp;
186
          <code>metacatuser</code>
187
      </td>
188
    </tr>
189
    <tr>
190
      <td>password</td>
191
      <td>The database password that you set up to use Metacat.</td>
192
      <td>Default:&nbsp;&nbsp;
193
          <code>yourPasswordHere</code>
194
      <br><br>Example:&nbsp;&nbsp;
195
          <code>metacat123</code>
196
      </td>
197
    </tr>
198
    <tr>
199
      <td>datafilepath</td>
200
      <td>The datafilepath is the directory to store data files.</td>
201
      <td>Default:&nbsp;&nbsp;
202
          <code>/var/metacat/data</code>
203
      <br><br>Example:&nbsp;&nbsp;
204
          <code>C:/Tomcat-5.5/data/metacat/data</code>
205
      </td>
206
    </tr>
207
    <tr>
208
      <td>inlinedatafilepath</td>
209
      <td>The inlinedatafilepath is the directory to store inline data that
210
          has been extracted from EML documents.</td>
211
      <td>Default:&nbsp;&nbsp;
212
          <code>/var/metacat/inline-data</code>
213
      <br><br>Example:&nbsp;&nbsp;
214
          <code>C:/Tomcat-5.5/data/metacat/inlinedata</code>
215
      </td>
216
    </tr>
217
    <tr>
218
      <td>default-style</td>
219
      <td>The default-style parameter defines the "style-set" that is to be used
220
          by default when the qformat parameter is missing or set to "html"
221
          during a query. It is set to "default", which is one of the styles that 
222
          ships with the default metacat distribution. Other possible settings
223
          are shown in the examples to the right.</td>
224
      <td>Default:&nbsp;&nbsp;
225
          <code>default</code>
226
      <br><br>Examples:<code>esa kepler knb knb2 knp lter ltss nceas nrs obfs pisco specnet</code>
227
      </td>
228
    </tr>
229
    <tr>
230
      <td>administrators</td>
231
      <td>The administrators parameter lists the accounts that are allowed to
232
          perform administrative actions such as rebuilding indices for 
233
          documents. The list can contain more than one account separated
234
          by colons.</td>
235
      <td>Default:&nbsp;&nbsp;
236
          <code>uid=jones,o=NCEAS,dc=ecoinformatics,dc=org</code>
237
      <br><br>Examples:&nbsp;&nbsp;
238
          <code>uid=localadmin,o=ucnrs.org</code>
239
      </td>
240
    </tr>
241
	
242
	<!-- start lsid stuff -->
243
	<tr>
244
      <td>authority.context</td>
245
      <td>This is the context for the (Life Sciences Identifier) LSID authority.
246
        LSID support is an optional feature which can be configured to provide
247
        metacat access to LSID clients. For more information on LSID's see <a href="http://wiki.gbif.org/guidwiki/wikka.php?wakka=LSID">TDWG
248
        site</a>.</td>
249
      <td>Default: <code>authority</code></td>
250
    </tr>
251
	<tr>
252
      <td>config.lsidauthority</td>
253
      <td>This is the name of the LSID authority that this metacat should use.
254
        This authority needs to be defined as SRV record in a DNS.</td>
255
      <td><p>Default: <code>ecoinformatics.org</code></p>
256
        <p>Examples: <code>esa.org</code> or <code>sulphur.ecoinformatics.org</code></p></td>
257
    </tr>
258
    <tr>
259
      <td>install.ecogrid</td>
260
      <td>Enables EarthGrid web services. EarthGrid web services are disabled by default. 
261
          To enable EarthGrid web services (including query, put, authentication and 
262
          identifier interface), set this value to <code>true</code>, and also set the value
263
          of the <em>metacat.dir</em> property as detailed below.</td>
264
      <td>
265
          Default:&nbsp;&nbsp;<code>false</code>
266
      </td>
267
    </tr>
268
    <tr>
269
      <td>metacat.dir</td>
270
      <td>If the <em>install.ecogrid</em> property (see above) is set to <code>true</code>, this
271
          property should be set to the absolute path of the top-level metacat directory.
272
          If <em>install.ecogrid</em> is set to <code>false</code> (the default setting), 
273
          the value of <em>metacat.dir</em> is ignored.          
274
      </td>
275
      <td>Default:&nbsp;&nbsp;<code>/home/tao/project/metacat</code></td>
276
    </tr>
277
  </table>
278
   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
279
   seek/projects/ecogrid/conf/MetacatImpl/classes/metacat.properties file.
280
  <br>
281

    
282
  <p>
283
  Other properties in <code>build.properties</code> that you can (but generally need not) change:
284
  </p>
285

    
286
  <table border="1">
287
    <tr>
288
      <td><b>Property</b></td>
289
      <td><b>Description</b></td>
290
      <td><b>Default value and examples of other values</b></td>
291
    </tr>
292
    <tr>
293
      <td>server</td>
294
      <td>The server property is the hostname and port number of the server that Metacat uses
295
          for replicating documents to and from other Metacat servers, which should be with the secure (HTTPS) port.
296
          Since this property is usually composed of the <code>config.hostname</code> and <code>config.port.https</code> properties (described above),
297
          the default setting can be used in most cases.
298
      </td>
299
      <td>Default:&nbsp;&nbsp;<code>${config.hostname}:${config.port.https}</code></td>
300
    </tr>
301
    <tr>
302
      <td>httpserver</td>
303
      <td>httpserver is the plain HTTP address and port number that Metacat uses for purposes
304
          other than replication. Since this property is usually composed of the <code>config.hosthame</code> and <code>config.port</code>
305
          properties (described above), the default setting can be used in most cases.</td>
306
      <td>Default:&nbsp;&nbsp;<code>${config.hostname}:${config.port}</code>
307
      </td>
308
    </tr>
309
    <tr>
310
      <td>http.protocol</td>
311
      <td>http.protocol is the string used in the leading part of a URL to indicate use of the HTTP protocol.</td>
312
      <td>Default:&nbsp;&nbsp;<code>http</code>
313
      </td>
314
    </tr>
315
    <tr>
316
      <td>config.metacatserver</td>
317
      <td>The URL to the metacat server, composed in part from three other properties (http.protocol, httpserver, and metacat.context).</td>
318
      <td>Default:&nbsp;&nbsp;<code>${http.protocol}://${httpserver}/${metacat.context}/metacat</code>
319
      </td>
320
    </tr>
321
    <tr>
322
      <td>inst.cgi.dir</td>
323
      <td>Installation directory for registry CGI scripts</td>
324
      <td>Default:&nbsp;&nbsp;
325
          <code>/var/www/cgi-knb</code>
326
      </td>
327
    </tr>
328
    <tr>
329
      <td>cgi-prefix</td>
330
      <td>The URL used for executing CGI scripts</td>
331
      <td>Default:&nbsp;&nbsp;
332
          <code>http://${httpserver}/cgi-bin</code>
333
      </td>
334
    </tr>
335
    <tr>
336
      <td>cvsroot</td>
337
      <td>CVS access to retrieve latest EML. Only used by
338
          developers in building the release.</td>
339
      <td>Default:&nbsp;&nbsp;
340
          <code><pre>:ext:${env.USER}@cvs.ecoinformatics.org:/cvs</pre></code>
341
          Example:&nbsp;&nbsp;
342
          <code><pre>:ext:myaccount@cvs.ecoinformatics.org:/cvs</pre></code>
343
      </td>
344
    </tr>
345
    <tr>
346
      <td>knb-site-url</td>
347
      <td>This is the URL to the web context root for the knb site. 
348
          It is used for the qformat=knb skin only.</td>
349
      <td>Default:&nbsp;&nbsp;
350
          <code>http://knb.ecoinformatics.org</code>
351
      </td>
352
    </tr>
353
    <tr>
354
      <td>timedreplication</td>
355
      <td>Determines whether timed replication to other metacat servers is being used.</td>
356
      <td>Default:&nbsp;&nbsp;
357
          <code>false</code>
358
      <br><br>Other possible values:&nbsp;&nbsp;
359
          <code>true</code>
360
      </td>
361
    </tr>
362
    <tr>
363
      <td>firsttimedreplication</td>
364
      <td>The time for starting first timed replication if timedreplication is true.
365
          (See comments in build.properties file for additional details.)</td>
366
      <td>Default:&nbsp;&nbsp;
367
          <code>10:00 PM</code>
368
          <code>&nbsp;</code>
369
      </td>
370
    </tr>
371
    <tr>
372
      <td>timedreplicationinterval</td>
373
      <td>The interval to next timed replication if timedreplication is true.
374
          The value is in milliseconds and default value is 48 hours.</td>
375
      <td>Default:&nbsp;&nbsp;
376
          <code>172800000</code>
377
          <code>&nbsp;</code>
378
      </td>
379
    </tr>
380
    <tr>
381
      <td>forcereplicationwaitingtime</td>
382
      <td>The waiting time before replication is forced to begin after
383
          uploading a package. The default value should usually suffice.</td>
384
      <td>Default:&nbsp;&nbsp;
385
          <code>30000</code>
386
          <code>&nbsp;</code>
387
      </td>
388
    </tr>
389
    <tr>
390
      <td>log.dir</td>
391
      <td>The directory where replication log files are to be written by Metacat.</td>
392
      <td>Default:&nbsp;&nbsp;<code>${tomcat}/logs</code></td>
393
    </tr>
394
    <tr>
395
      <td>moderators</td>
396
      <td>Moderator accounts, in a colon-separated list. Specifies a list of special users who can review a general user's submission. 
397
             Moderators can approve, revise and reject the submission after reviewing. This property is only used in the ESA skin.</td>
398
      <td>Default:&nbsp;&nbsp;<code>cn=knb-prod,o=NCEAS,dc=ecoinformatics,dc=org</code></td>
399
    </tr>
400
    <tr>
401
      <td>allowedSubmitters</td>
402
      <td>Specifies the list of users who should be allowed to submit documents. 
403
          If no value is specified (the default setting), all users will be allowed to submit documents.
404
      </td>
405
      <td>Default:&nbsp;&nbsp;(no value)</td>
406
    </tr>
407
    <tr>
408
      <td>deniedSubmitters</td>
409
      <td>Specify the list of users who should not be allowed to submit documents. 
410
          If no value is specified (the default setting), all users will be allowed to submit documents.</td>
411
      <td>Default:&nbsp;&nbsp;(no value)</td>
412
    </tr>
413
    <tr>
414
      <td>config.metadataLabelLsid</td>
415
      <td> </td>
416
      <td>Default:&nbsp;&nbsp;<code>${config.lsidauthority}</code></td>
417
    </tr>
418
    <tr>
419
      <td>build.dir</td>
420
      <td>The name of the subdirectory that is created when metacat is built by the 'ant' tool.</td>
421
      <td>Default:&nbsp;&nbsp;<code>build</code></td>
422
    </tr>
423
    <tr>
424
      <td>lsid.build.dir</td>
425
      <td>The name of the subdirectory for building the LSID component of metacat.</td>
426
      <td>Default:&nbsp;&nbsp;<code>${build.dir}/lsid</code></td>
427
    </tr>
428
    <tr>
429
      <td>lib.dir</td>
430
      <td>The name of the subdirectory where library (.jar) files and a number of other important files are located.</td>
431
      <td>Default:&nbsp;&nbsp;<code>lib</code></td>
432
    </tr>
433
    <tr>
434
      <td>lsid.lib.dir</td>
435
      <td>The name of the subdirectory where LSID library (.jar) files are located.</td>
436
      <td>Default:&nbsp;&nbsp;<code>${lib.dir}/lsid_lib</code></td>
437
    </tr>
438
    <tr>
439
      <td>lsid.classes.dir</td>
440
      <td>The relative path to the location of Java classes that support LSID.</td>
441
      <td>Default:&nbsp;&nbsp;<code>edu/ucsb/nceas/metacat/lsid</code></td>
442
    </tr>
443
    <tr>
444
      <td>conf.dir</td>
445
      <td>The name of the directory where LSID configuration files are located.</td>
446
      <td>Default:&nbsp;&nbsp;<code>lib/lsid_conf</code></td>
447
    </tr>
448
    <tr>
449
      <td>services.dir</td>
450
      <td>The name of the directory where LSID services configuration files are located.</td>
451
      <td>Default:&nbsp;&nbsp;<code>${conf.dir}/services</code></td>
452
    </tr>
453
    <tr>
454
      <td>webinf.dir</td>
455
      <td>The name of the directory where additional LSID web services files are located.</td>
456
      <td>Default:&nbsp;&nbsp;<code>${conf.dir}/WEB-INF</code></td>
457
    </tr>
458
    <tr>
459
      <td>compile.debug</td>
460
      <td>Indicates whether Java source should be compiled with debug information.</td>
461
      <td>Default:&nbsp;&nbsp;<code>true</code></td>
462
    </tr>
463
    <tr>
464
      <td>compile.deprecation</td>
465
      <td>Indicates whether Java source should be compiled with deprecation information.</td>
466
      <td>Default:&nbsp;&nbsp;<code>false</code></td>
467
    </tr>
468
    <tr>
469
      <td>compile.optimize</td>
470
      <td>Indicates whether Java source should be compiled with optimization.</td>
471
      <td>Default:&nbsp;&nbsp;<code>true</code></td>
472
    </tr>
473
    <tr>
474
      <td>indexPaths</td>
475
      <td>The <em>indexPaths</em> property specifies a comma-separated (potentially long) list 
476
          of indexed paths that can be utilized to improve the
477
          performance of metacat queries. Each component of the <em>indexPaths</em> property
478
          should specify an absolute or relative path (using an XPath-like syntax) to an XML element or 
479
          attribute present in the XML documents being queried. Metacat stores XML 
480
          element and attribute values for indexed paths in a special database table 
481
          that optimizes search performance.
482
          <p>Metacat queries allow you to specify (using the &lt;pathexpr&gt; tag in search query) 
483
          an exact path to which you want
484
          to restrict the search. When the &lt;pathexpr&gt; path that is specified in the query
485
          is a member of the <em>indexPaths</em> list, search results are returned faster 
486
          because metacat can conduct its search using the optimized database table.
487
          <p>
488
          The default value for the <em>indexPaths</em> property contains numerous paths to EML
489
          elements and attributes that are commonly queried by metacat search tools. 
490
          For example, <em>keyword</em> is a
491
          member of this list because it is common for search tools to query
492
          the <em>keyword</em> field in EML documents. For most purposes, the default value will
493
          optimize various types of searches on EML documents and need not be changed.
494
          <p>
495
          For more information about metacat queries, 
496
          see <a href="./metacatquery.html">Queries and Results</a>.
497
      </td>
498
      <td>Default:&nbsp;&nbsp;<code>organizationName,originator/individualName/surName,...</code></td>
499
    </tr>
500
  </table>
501
  <p>
502
  Metacat has a number of additional settable properties in file
503
  <code>lib/metacat.properties</code>. Under most circumstances,
504
  you will not need to modify this file because the properties of interest
505
  to you can be controlled by editing <code>build.properties</code> as
506
  described above. To learn more about Metacat's additional properties,
507
  see <a href="./properties.html">Metacat Properties File</a>.
508
  </p>
509
  <p class="emphasis">
510
   Note: When setting properties, DO NOT add a trailing slash [/] to the end of any paths that are specified.
511
   Metacat will not function correctly if you do so.
512
  </p>
513

    
514
</td>
515
</tr>
516
</table>
517

    
518
<table class="tabledefault" width="100%">
519
<td class="tablehead" colspan="2"><p><a name="Compilation and Installation"><h2>Compilation and Installation</h2></p></td>
520
<tr>
521
<td>
522
  <a name="protocol"></a>
523
  <p>This section is only for a fresh installation. If you are upgrading an existing Metacat, please skip
524
  this section and go to the next one -  <a HREF="metacatinstall.html#Upgrade">Compilation and Upgrading Existing Metacat</a>
525
  <p>    
526
  <h3>Run Ant Build</h3></p>
527
  <p>
528
   Ant allows compilation and installation to be done in one step.
529
   Change into the metacat directory and type: 
530
   <pre><b>ant install</b></pre>
531
   <p>
532
   You should see a bunch of messages telling you the progress of compilation
533
   and installation.  When it is done you should see the message 
534
   BUILD SUCCESSFUL
535
   and you should be returned to a UNIX command prompt.  If you do not see
536
   the message BUILD SUCCESSFUL then there was an error that you need to 
537
   resolve.
538
   This may come up if you are logged in as a user that does not have write
539
   access to one or more of the directories that are listed in the build.xml
540
   file, or if any of the paths to files are not configured correctly in the
541
   "config" target.
542
  </p>
543
  <p>
544
  Note: The 'data' directories that are indicated in the 'datafilepath' and
545
  'inlinedatafilepath' build properties must be writable
546
  by user account under which Tomcat runs or you will not be able to upload 
547
  data files to the system.
548
  </p>
549

    
550
  <p class="header">To install metacat LSID support, adjust the LSID-related
551
    properties in the build.properties files and type:
552
  <p class="header"><b>ant deploy-lsid</b>
553
  <p>    
554
  <h3>SQL Scripts</h3></p>
555
  <p>
556
   You now need to set up the table structure in your database.  You can 
557
   do this either using the ant build system, or by manually running the
558
   scripts using a sql utility.
559
  </p>
560
  <p><b>WARNING: Do NOT run this on an existing metacat installation as it
561
  will delete all of your data.  If you have an existing metacat installation,
562
  see the instructions for <a HREF="metacatinstall.html#Upgrade">"Compilation and Upgrading Existing Metacat"</a> below.</b></p>
563

    
564
  <p>To run the scripts using ant, type
565
   <pre><b>ant installdb</b></pre> 
566
  </p>
567
  <p>To run the scripts manually, change to the
568
   metacat/build/src directory.  Then run you RDBMS's SQL utility.  In Oracle it is
569
   SQLPlus.  This tutorial assumes an Oracle database so this example is for
570
   SQLPlus.  Login as the oracle user that was set up for use with Metacat.
571
   At the SQLPlus prompt type the following: <pre><b>@xmltables.sql;</b></pre>
572
   For postgres, use a command like: 
573
   <code>psql -U metacat -W -h localhost -f build/src/xmltables-postgres.sql metacat</code>
574
  </p>
575
  <p>Either way, 
576
   you should see a bunch of output showing the creation of the Metacat table
577
   space. The first time you run this script you will get several errors at the 
578
   beginning saying that you cannot drop a table/index/trigger because it 
579
   does not exist.  This is normal.  Any other errors besides this need to be
580
   resolved before continuing. The script file name for PostgreSQL is 
581
   xmltables-postgres.sql and for Microsoft SQL server is 
582
   xmltables-sqlserver.sql.
583
  </p>
584
  <p>
585
   If the script has run correctly you should be able to type 
586
   <pre>describe xml_documents</pre> and it should show:
587
   <pre>
588
    Name            Null?         Type
589
    --------------  ------------  ---------------- 
590
     DOCID          NOT NULL      VARCHAR2(250)
591
     ROOTNODEID                   NUMBER(20)
592
     DOCNAME                      VARCHAR2(100)
593
     DOCTYPE                      VARCHAR2(100)
594
     DOCTITLE                     VARCHAR2(1000)
595
     USER_OWNER                   VARCHAR2(100)
596
     USER_UPDATED                 VARCHAR2(100)
597
     SERVER_LOCATION              NUMBER(20)
598
     REV                          NUMBER(10)
599
     DATE_CREATED                 DATE
600
     DATE_UPDATED                 DATE
601
     PUBLIC_ACCESS                NUMBER(1)
602
     UPDATED                      NUMBER(1)
603
   </pre>
604
  </p>
605
  <p><h3>Register schemas and DTDs</h3></p>
606
  <p>Once the tables have been created, you should also register the Ecological
607
  Metadata Language (EML) DTDs and schemas. <b>However, note that you should 
608
  NOT do this if you are upgrading an existing installation -- the upgrade
609
  scripts take care of it for you (see the next section).</b>  If you are
610
  installing new, you can register the schema documents by running:</p>
611
  <pre><b>ant register-schemas</b></pre> 
612
  <p>This command registers the EML DTDs' and schemas' location in the 
613
  metacat server.  Your database username and password have to be set correctly
614
  for this to work.  Also, if for some reason running this script from ant
615
  does not work, you could instead try running "build/src/loaddtdschema.sql"
616
  from your sql utility (but be sure to use the version in the 'build' directory
617
  that has been customized for your installation).
618
  </p>
619
  <h3>Restart Tomcat</h3>
620
  <p>
621
   Once you have successfully installed Metacat, there is one more step.  Tomcat
622
   (and Apache if you have Tomcat integrated with it) must be restarted.  To do
623
   this, login as the user that runs your tomcat server (often "tomcat"),
624
   go to $CATALINA_HOME/bin and type:
625
   <pre>
626
   <b>
627
   ./shutdown.sh 
628
   ./startup.sh
629
   </b> 
630
   </pre>
631
   In the Tomcat startup messages you should see something in the log file like:
632
   <pre>
633
	Metacat: [WARN]: Metacat (1.8.1) initialized. [edu.ucsb.nceas.metacat.MetaCatServlet]
634
   </pre>
635
   If you see that message Tomcat is successfully loading the Metacat servlet.
636
   Next, try to run your new servlet.  Go to a web browser and type:
637
   <pre>http://yourserver.yourdomain.com/yourcontext/</pre>
638
   You should substitute your context name for "yourcontext" in the url above.
639
   If everything is working correctly, you should see a query page followed
640
   by an empty result set.  Note that if you do not have Tomcat integrated with
641
   Apache you will probably have to type
642
   <pre>http://yourserver.yourdomain.com:8080/yourcontext/</pre>
643
  </p>
644
  <p><b>Troubleshooting</b>: If you see something like java.lang.InternalError: 
645
  Can't connect to X11 window server using 'yourservanme:0.0' as the value of the DISPLAY variable.
646
  <p>You should add this line: 
647
  <b>JAVA_OPTS="-Djava.awt.headless=true $JAVA_OPTS"</b> at the first line of
648
  catalina.sh file in tomcat bin directory. The reason is that GeoServer uses X11 windows to draw graphics.
649
  </p>
650
  
651
  <h3>Deploy wsdl file (Only for EarthGrid-enabled Metacat installation) </h3>
652
  <p>
653
   Once Tomcat is running successfully, there is another step for EarthGrid-enabled Metacat installation. 
654
   In metacat directory, type:
655
   <pre><b>ant deploy-ecogrid</b></pre> 
656
   It will generate wsdl files for EarthGrid services.
657
   </p>
658

    
659
</td>
660
</tr>
661
</table>
(34-34/61)