Project

General

Profile

« Previous | Next » 

Revision 932

Added by Matt Jones over 22 years ago

Updated installation instructions to reflect the new procedures involved
with the changes to build.xml.

View differences:

docs/user/metacatinstall.html
45 45
<tr>
46 46
<td>
47 47
  <p class="emphasis">
48
   These installation instructions are meant for a systems administrator/DBA or someone
49
   who is an advanced computer user.  They are NOT meant for the average computer user.
50
   Please realize that by executing these instructions, you may have to trouble shoot
51
   many advanced issues yourself.
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 52
</td>
53 53
</tr>
54 54
</table>
......
74 74
   Metacat.
75 75
   <ul>
76 76
     <li><a href="http://www.oracle.com">Oracle 8i</a> (or another SQL92
77
         compliant RDBMS)</li>
77
         compliant RDBMS like Postgres)</li>
78 78
     <li><a href="http://jakarta.apache.org/ant/index.html">Apache Jakarta-Ant</a>
79 79
     </li>
80 80
     <li><a href="http://jakarta.apache.org/tomcat/index.html">Apache Jakarta-Tomcat</a>
81
       <p class="emphasis">Note: For a more robust web serving environment, Apache web server should
81
       <p class="emphasis">Note: For a more robust web serving environment, 
82
       Apache web server should
82 83
       be installed along with Tomcat and the two should be integrated
83 84
       as described on the Apache web site.</p>
84 85
     </li>
......
112 113
   It takes in installation parameters from a file in the root installation
113 114
   directory named "build.xml".  The Metacat CVS module contains a default
114 115
   build.xml file that may require some modification upon installation.  Ant
115
   Should be installed on the system and the "ant" executable shell script 
116
   should be installed on the system and the "ant" executable shell script 
116 117
   should be available in the users path.
117 118
  </p>
118 119
  <p class="header">Tomcat</p>
119 120
  <p>
120 121
    Install tomcat into the directory of your choice. The directory in which 
121
    you install Tomcat itself will be referred to as the "{Tomcat install 
122
    directory}".  This install assumes Tomcat version 3.1.  The Tomcat configuration
123
    will be slightly different depending on what version of Tomcat you are running.
122
    you install Tomcat itself will be referred to as the "$TOMCAT_HOME".
123
    This install assumes Tomcat version 3.1.  The Tomcat 
124
    configuration will be slightly different depending on what version of 
125
    Tomcat you are running.
124 126
  </p>
125 127
  <p>
126
    You must now set up your servlet context.  Change to the {Tomcat install 
127
    directory}/conf.  Edit the tomcat.conf file.  Find a line that looks like:
128
    You must now set up your servlet context.  Change to the $TOMCAT_HOME/conf.
129
    Edit the tomcat.conf file.  Find a line that looks like:
128 130
    <pre>ApJServMount /examples /root</pre>  
129 131
    Add the following line below the aforementioned text:
130 132
    <pre>ApJServMount /metadata /root</pre>
......
141 143
   Save server.xml.
142 144
   <div class="emphasis">Note that capital "C" on "Context".  This MUST be a 
143 145
   capital "C".  Also note that "metadata" is an arbitrary servlet name.  You
144
   may pick whatever servlet name you wish.</div>
146
   may pick whatever servlet name you wish. Also note that the path to the
147
   servlet context will depend on where you install the tomcat webapps 
148
   directory.</div>
145 149
  </p>
146 150
  <p>
147 151
   After setting up Tomcat, you must make a slight modification to the startup
......
196 200
  <p>
197 201
   Once you have either checked out or unzipped and untarred the source
198 202
   distribution, you can begin the installation process.  Change into the 
199
   xmltodb directory and edit the file called "build.xml".  The top of a 
200
   sample build.xml file is shown below.
201
   <pre>
202
      &lt;property name="jdbc-connect" value="jdbc:oracle:thin:@dev.nceas.ucsb.edu:1521:exp"/&gt;
203
      &lt;property name="dbDriver" value="oracle.jdbc.driver.OracleDriver"/&gt;
204
      &lt;property name="installdir" value="/opt/tomcat/webapps/metadata" /&gt;
205
      &lt;property name="name" value="metacat"/&gt;
206
      &lt;property name="Name" value="MetaCat"/&gt;
207
      &lt;property name="release" value="1.0.1"/&gt;
208
      &lt;property name="web-base-url" value="http://knb.ecoinformatics.org"/&gt;
209
      &lt;property name="replication-path" value="/metadata/servlet/replication"/&gt;
210
      &lt;property name="servlet-path" value="/metadata/servlet/metacat"/&gt;
211
      &lt;property name="html-path" value="/metadata"/&gt;
212
      &lt;property name="image-path" value="/img/metadata" /&gt;
213
      &lt;property name="style-path" value="/jones/style"/&gt;
214
      &lt;property name="serverhost" value="dev.nceas.ucsb.edu"/&gt;
215
      &lt;property name="server" value="http://metacat.nceas.ucsb.edu"/&gt;
216
      &lt;property name="replication-log" value="metacatreplication.log"/&gt;
217
      &lt;property name="user" value="metadata"/&gt;
218
      &lt;property name="password" value="your-pw-goes-here"/&gt;
219
      &lt;property name="config-dir" value="${installdir}" /&gt;
220
      &lt;property name="default-style" value="knb" /&gt;
221
      &lt;property name="eml-module" value="mdstandards/eml" /&gt;
222
      &lt;property name="eml-version" value="2.0.0beta6" /&gt;
223
      &lt;property name="eml-tag" value="RELEASE_EML_2_0_0_BETA_6" /&gt;
224
      &lt;property name="cvsroot" 
225
               value=":ext:jones@cvs.nceas.ucsb.edu:/cvs/pbi" /&gt;
226

  
227

  
228
   </pre>
203
   xmltodb directory and edit the file called "build.xml".  You will need 
204
   to change a number of configuration properties to match the setup on
205
   your system.  If you are using oracle, you'll need to customize the
206
   properties in the "oracle" target.  If you are using Postgres, you'll
207
   need to customize the properties inthe "postgres" target.  All users
208
   will need to customize the properties in the "config" target.
229 209
  </p>
230 210
  <p>
231
   The configuration changes that you need to make are the jdbc-connect, 
232
   installdir, web-base-url, replication-path, servlet-path, html-path, 
233
   image-path, style-path, server, replication-log, user and password.  
234
   Each is described below.
211
   The properties that you need to change will include jdbc-connect, 
212
   dbDriver, dbAdapter, oracle_home, jdbc, tomcat, webapps, context,
213
   user, password, server, web-base-url, and default-style.
214
   Each is described in detail below. You should also verify that the 
215
   jar file properties mentioned in the remainder of the config target are
216
   accessible at the paths listed -- the defaults will usually work.
235 217
  </p>
218
  Properties you will likely need to change:<br />
236 219
  <ul>
237 220
  <li>
238 221
   The jdbc-connect parameter is the JDBC connection string needed to connect 
......
245 228
   property in the <a href="./properties.html"?>metacat.properties</a> file.
246 229
  </li>
247 230
  <li>
248
   The installdir
249
   parameter is the directory that you want Ant to install the servlet to.
250
   It is your "servlet context path" that was defined above.
231
   The dbAdapter parameter is the name of the Metacat adapter class to be used
232
   to communicate with a particular database.
233
   If you are not using Oracle, you will need to change this.  There are 
234
   currently adapters for Oracle, Postgres, and MS SQL Server.
251 235
  </li>
252 236
  <li>
237
   The oracle_home parameter is the location that oracle is installed on 
238
   your system.
239
  </li>
240
  <li>
241
   The jdbc parameter is the location of your jdbc driver jar file.
242
  </li>
243
  <li>
244
   The tomcat parameter is the location in which tomcat is installed.
245
  </li>
246
  <li>
247
   The webapps parameter is the location in which your tomcat servlet
248
   contexts are installed.  This is typically "$TOMCAT_HOME/webapps".
249
  </li>
250
  <li>
251
   The context parameter is the name of the servlet context in which
252
   you want metacat to be installed.  This will determine the installation
253
   directory for the servlet and many of the urls that are used to
254
   access the installed Metacat server.
255
  </li>
256
  <li>
253 257
   Web-base-url is the URL from which you want to load any stylesheets 
254 258
   or supplementary images.
255 259
  </li>
256 260
  <li>
261
   The server is the http address on which Metacat is running.
262
  </li>
263
  <li>
264
   The user and password parmaters are the database user name that you set up
265
   to use Metacat, for example an Oracle username and password.
266
  </li>
267
  <li>
268
   The default-style parameter defines the "style-set" that is to be used
269
   by default when the qformat parameter is missing or set to "html" during
270
   a query.  It is set to "knb", which is the only style that ships with the
271
   default metacat distribution.  If you create your own stylesheets for
272
   displaying metacat output, you may want to create a new config file in the
273
   config-dir (e.g., mystyle.xml) and then change the default-style to use
274
   your custom style (e.g., "mystyle").
275
  </li>
276
  </ul>
277

  
278
  Other properties that you can but generaly need not change:<br />
279
  <ul>
280
  <li>
281
   The installdir
282
   parameter is the directory that you want Ant to install the servlet to.
283
   It is your "servlet context path" that was defined above.
284
  </li>
285
  <li>
257 286
   Replication path is the relative path to the replication servlet.  This
258 287
   should be the name of your servlet followed by "/servlet/replication".
259 288
  </li>
......
275 304
   should be a directory that is accessible by the web server.
276 305
  </li>
277 306
  <li>
278
   The serverhost is the full internet name of the server on which Metacat 
279
   is running.
280
  </li>
281
  <li>
282
   The server is the http address on which Metacat is running.
283
  </li>
284
  <li>
285 307
   Replication-log is the location at which you want Metacat to place any 
286 308
   replication log files.  The user that starts Tomcat must have permission to
287 309
   write to this directory.
288 310
  </li>
289 311
  <li>
290
   The user and password parmaters are the database user name that you set up
291
   to use Metacat, for example an Oracle username and password.
292
  </li>
293
  <li>
294 312
   The config-dir parameter specifies the location of the configuration files
295 313
   for the "style-sets" feature.  It is set by default to the installation
296 314
   directory and generally does not need to be changed.
297 315
  </li>
298 316
  <li>
299
   The default-style parameter defines the "style-set" that is to be used
300
   by default when the qformat parameter is missing or set to "html" during
301
   a query.  It is set to "knb", which is the only style that ships with the
302
   default metacat distribution.  If you create your own stylesheets for
303
   displaying metacat output, you may want to create a new config file in the
304
   config-dir (e.g., mystyle.xml) and then change the default-style to use
305
   your custom style (e.g., "mystyle").
306
  </li>
307
  <li>
308 317
   The eml-module, eml-version, eml-tag parameters control the installation
309 318
   behavior with respect to EML.  You should not need to change these paramters.
310 319
  </li>
......
323 332
   xmltodb/src directory.  Then run you RDBMS's SQL utility.  In Oracle it is
324 333
   SQLPlus.  This tutorial assumes an Oracle database so this example is for
325 334
   SQLPlus.  Login as the oracle user that was set up for use with Metacat.
326
   At the SQLPlus prompt type the following: <pre>@xmltables.sql;</pre>
335
   At the SQLPlus prompt type the following: <pre>@src/xmltables.sql;</pre>
327 336
   You should see a bunch of output showing the creation of the Metacat table
328 337
   space. The first time you run this script you will get several errors at the 
329 338
   beginning saying that you cannot drop a table/index/trigger because it 
......
366 375
   <pre>ant protocol</pre>
367 376
   When it is done and says "BUILD SUCCESSFUL", change into the 'build' 
368 377
   directory.  There will be a file there called 'protocol.jar'.  Now, copy 
369
   that file to {tomcat install directory}/lib/protocol.jar.  In our case: 
378
   that file to $TOMCAT_HOME/lib/protocol.jar.  In our case: 
370 379
   <pre>cp protocol.jar /usr/local/devtools/jakarta-tomcat/lib/.</pre>
371 380
   <div class="emphasis">Note that once you have installed the protocol handlers
372 381
   you do not need to install them again.  You can recompile Metacat and install
......
379 388
   Change into the xmltodb directory and type: 
380 389
   <pre>ant install</pre>
381 390
   You should see a bunch of messages telling you the progress of compilation
382
   and installation.  When it is done you should see the message BUILD SUCCESSFUL
391
   and installation.  When it is done you should see the message 
392
   BUILD SUCCESSFUL
383 393
   and you should be returned to a UNIX command prompt.  If you do not see
384
   the message BUILD SUCCESSFUL then there was an error that you need to resolve.
394
   the message BUILD SUCCESSFUL then there was an error that you need to 
395
   resolve.
385 396
   This may come up if you are logged in as a user that does not have write
386 397
   access to one or more of the directories that are listed in the build.xml
387
   file. 
398
   file, or if any of the paths to files are not configured correctly in the
399
   "config" target.
388 400
  </p>
389 401
  <p>Once metacat itself is installed, you should also register
390 402
  the Ecological Metadata Language (EML) DTDs. This process is done most
......
394 406
  <p>
395 407
   Once you have successfully installed Metacat, there is one more step.  Tomcat
396 408
   (and Apache if you have Tomcat integrated with it) must be restarted.  To do
397
   this go to {Tomcat install directory}/bin and type 
409
   this, login as the user that runs your tomcat server (ofter "tomcat"),
410
   go to $TOMCAT_HOME/bin and type:
398 411
   <pre>
399 412
   ./tomcat.sh stop
400 413
   ./tomcat.sh start
......
407 420
   </pre>
408 421
   If you see that message Tomcat is successfully loading the Metacat servlet.
409 422
   Next, try to run your new servlet.  Go to a web browser and type:
410
   <pre>http://yourserver.yourdomain.com/metadata/</pre>
423
   <pre>http://yourserver.yourdomain.com/yourcontext/</pre>
424
   You should substitute your context name for "yourcontext" in the url above.
411 425
   If everything is working correctly, you should see a query page followed
412 426
   by an empty result set.  Note that if you do not have Tomcat integrated with
413 427
   Apache you will probably have to type
414
   <pre>http://yourserver.yourdomain.com:8080/metadata/</pre>
428
   <pre>http://yourserver.yourdomain.com:8080/yourcontext/</pre>
415 429
  </p>
416 430
</td>
417 431
</tr>

Also available in: Unified diff