Revision 1770
Added by Jing Tao over 21 years ago
metacatinstall.html | ||
---|---|---|
119 | 119 |
<p class="header">Tomcat</p> |
120 | 120 |
<p> |
121 | 121 |
Install tomcat into the directory of your choice. The directory in which |
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. |
|
122 |
you install Tomcat itself will be referred to as the "$CATALINA_HOME". |
|
123 |
We recommend to install Tomcat version 4.0. More details about |
|
124 |
tomcat installation is avaliable in <a href=" http://jakarta.apache.org/tomcat/index.html">here</a>. |
|
126 | 125 |
</p> |
127 |
<p> |
|
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: |
|
130 |
<pre>ApJServMount /examples /root</pre> |
|
131 |
Add the following line below the aforementioned text: |
|
132 |
<pre>ApJServMount /metadata /root</pre> |
|
133 |
Save tomcat.conf. |
|
134 |
</p> |
|
135 |
<p> |
|
136 |
Edit the server.xml file. Go to the bottom of the file. Find the line that |
|
137 |
says: |
|
138 |
<pre><Context path="/examples" docbase="/webapps/examples" debug="0" reloadable="true" > |
|
139 |
</Context></pre> |
|
140 |
Directly below these lines enter the following: |
|
141 |
<pre><Context path="/metadata" docbase="/opt/tomcat/webapps/metadata" debug="0" reloadable="true" > |
|
142 |
</Context></pre> |
|
143 |
Save server.xml. |
|
144 |
<div class="emphasis">Note that capital "C" on "Context". This MUST be a |
|
145 |
capital "C". Also note that "metadata" is an arbitrary servlet name. You |
|
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> |
|
149 |
</p> |
|
150 |
</td> |
|
126 |
</td> |
|
151 | 127 |
</tr> |
152 | 128 |
</table> |
153 | 129 |
|
154 | 130 |
<table class="tabledefault" width="100%"> |
155 |
<td class="tablehead" colspan="2"><p>Configuring the Server for Metacat</p></td>
|
|
131 |
<td class="tablehead" colspan="2"></td> |
|
156 | 132 |
<tr> |
157 | 133 |
<td> |
158 | 134 |
<p> |
... | ... | |
161 | 137 |
version of the source distribution of Metacat. You can get it two ways. |
162 | 138 |
Authorized users can check it out of the NCEAS |
163 | 139 |
<a href="http://www.nceas.ucsb.edu/cgi-bin/cvsweb.cgi/xmltodb/">CVS</a> |
164 |
system under the module name xmltodb. The command is as follows:
|
|
165 |
<pre>cvs checkout -P xmltodb</pre> Or you can
|
|
140 |
system under the module name metacat. The command is as follows:
|
|
141 |
<pre>cvs checkout -P metacat</pre> Or you can
|
|
166 | 142 |
<a href="@server@/software/download.html">download</a> a gzipped tar file |
167 | 143 |
from this site. |
168 | 144 |
</p> |
145 |
<p><h2>Edit build.xml File</h2></p> |
|
169 | 146 |
<p> |
170 | 147 |
Once you have either checked out or unzipped and untarred the source |
171 | 148 |
distribution, you can begin the installation process. Change into the |
172 |
xmltodb directory and edit the file called "build.xml". You will need
|
|
149 |
metacat directory and edit the file called "build.xml". You will need
|
|
173 | 150 |
to change a number of configuration properties to match the setup on |
174 | 151 |
your system. If you are using oracle, you'll need to customize the |
175 | 152 |
properties in the "oracle" target. If you are using Postgres, you'll |
... | ... | |
229 | 206 |
access the installed Metacat server. |
230 | 207 |
</li> |
231 | 208 |
<li> |
209 |
The user and password parameters are the database user name that you set up |
|
210 |
to use Metacat, for example an Oracle username and password. |
|
211 |
</li> |
|
212 |
<li> |
|
213 |
The tomcatversion is the version of your Tomcat. You should put tomcat3 or |
|
214 |
tomcat4 here. |
|
215 |
</li> |
|
216 |
<li> |
|
232 | 217 |
Web-base-url is the URL from which you want to load any stylesheets |
233 | 218 |
or supplementary images. |
234 | 219 |
</li> |
... | ... | |
242 | 227 |
any DTDs. |
243 | 228 |
</li> |
244 | 229 |
<li> |
245 |
The user and password parameters are the database user name that you set up |
|
246 |
to use Metacat, for example an Oracle username and password. |
|
230 |
The datafilepath is the directory to store the data file. |
|
247 | 231 |
</li> |
248 | 232 |
<li> |
233 |
The inlinedatafilepath is the directory to store inline data (This is for EML2). |
|
234 |
</li> |
|
235 |
<li> |
|
249 | 236 |
The default-style parameter defines the "style-set" that is to be used |
250 | 237 |
by default when the qformat parameter is missing or set to "html" during |
251 | 238 |
a query. It is set to "knb", which is the only style that ships with the |
... | ... | |
254 | 241 |
config-dir (e.g., mystyle.xml) and then change the default-style to use |
255 | 242 |
your custom style (e.g., "mystyle"). |
256 | 243 |
</li> |
244 |
<li> |
|
245 |
The debuglevel is the control value of debug message. Generally, it will vary |
|
246 |
from 0 to 70. In level 70, Metacat will desplay all debug messages. |
|
247 |
</li> |
|
248 |
<li> |
|
249 |
The forcereplicationwaitingtime is the waiting time for start force replication |
|
250 |
after uploading a package. Usually we use default value. |
|
251 |
</li> |
|
257 | 252 |
</ul> |
258 | 253 |
|
259 | 254 |
Other properties that you can but generaly need not change:<br /> |
... | ... | |
306 | 301 |
Note: DO NOT add a slash [/] to the end of these paths. Metacat will not |
307 | 302 |
function correctly if you do so. |
308 | 303 |
</p> |
309 |
<p class="header">Stylesheet Scripts</p>
|
|
304 |
<p class="header"><h2>SQL Scripts</h2></p>
|
|
310 | 305 |
<p> |
311 | 306 |
You now need to set up the table structure in your database. Change to the |
312 |
xmltodb/src directory. Then run you RDBMS's SQL utility. In Oracle it is
|
|
307 |
metacat/src directory. Then run you RDBMS's SQL utility. In Oracle it is
|
|
313 | 308 |
SQLPlus. This tutorial assumes an Oracle database so this example is for |
314 | 309 |
SQLPlus. Login as the oracle user that was set up for use with Metacat. |
315 |
At the SQLPlus prompt type the following: <pre>@src/xmltables.sql;</pre>
|
|
310 |
At the SQLPlus prompt type the following: <pre><b>@xmltables.sql;</b></pre>
|
|
316 | 311 |
You should see a bunch of output showing the creation of the Metacat table |
317 | 312 |
space. The first time you run this script you will get several errors at the |
318 | 313 |
beginning saying that you cannot drop a table/index/trigger because it |
319 | 314 |
does not exist. This is normal. Any other errors besides this need to be |
320 |
resolved before continuing. |
|
315 |
resolved before continuing. The script file name for PostgreSQL is |
|
316 |
xmltalbes_postgres.sql and for Microsoft SQL server is xmltables-sqlserver.sql. |
|
321 | 317 |
</p> |
322 | 318 |
<p> |
323 | 319 |
If the script has run correctly you should be able to type |
... | ... | |
345 | 341 |
</table> |
346 | 342 |
|
347 | 343 |
<table class="tabledefault" width="100%"> |
348 |
<td class="tablehead" colspan="2"><p>Compilation and Installation</p></td>
|
|
344 |
<td class="tablehead" colspan="2"><p><h2>Compilation and Installation</h2></p></td>
|
|
349 | 345 |
<tr> |
350 | 346 |
<td> |
351 | 347 |
<a name="protocol"></a> |
352 | 348 |
<p> |
353 | 349 |
Ant allows compilation and installation to be done in one step. |
354 | 350 |
Change into the metacat directory and type: |
355 |
<pre>ant install</pre> |
|
351 |
<pre><b>ant install</b></pre> |
|
352 |
<p> |
|
356 | 353 |
You should see a bunch of messages telling you the progress of compilation |
357 | 354 |
and installation. When it is done you should see the message |
358 | 355 |
BUILD SUCCESSFUL |
... | ... | |
366 | 363 |
</p> |
367 | 364 |
<p>Once metacat itself is installed, you should also register |
368 | 365 |
the Ecological Metadata Language (EML) DTDs and schemas. This process is done most |
369 |
easily by running "ant dtdschemasql" which registers the DTDs with the |
|
366 |
easily by running:</p> |
|
367 |
<pre><b>ant dtdschemasql</b></pre> |
|
368 |
<p>This command registers the DTDs' and schemas' location in the |
|
370 | 369 |
metacat server. Your database username and password have to be set correctly |
371 | 370 |
for this to work. |
372 | 371 |
</p> |
... | ... | |
374 | 373 |
Note: The 'data' directory in the installation directory must be writeable |
375 | 374 |
by whatever user is running Tomcat or you will not be able to upload data |
376 | 375 |
files to the system. |
376 |
<h2>Restart Tomcat</h2> |
|
377 | 377 |
<p> |
378 | 378 |
Once you have successfully installed Metacat, there is one more step. Tomcat |
379 | 379 |
(and Apache if you have Tomcat integrated with it) must be restarted. To do |
380 |
this, login as the user that runs your tomcat server (ofter "tomcat"),
|
|
381 |
go to $TOMCAT_HOME/bin and type:
|
|
380 |
this, login as the user that runs your tomcat server (often "tomcat"),
|
|
381 |
go to $CATALINA_HOME/bin and type:
|
|
382 | 382 |
<pre> |
383 |
./tomcat.sh stop
|
|
384 |
./tomcat.sh start
|
|
383 |
./shutdown.sh
|
|
384 |
./startup.sh
|
|
385 | 385 |
</pre> |
386 |
In the Tomcat startup messages you should see something like: |
|
386 |
In the Tomcat startup messages you should see something in log file like:
|
|
387 | 387 |
<pre> |
388 | 388 |
MetacatServlet Initialize |
389 | 389 |
Context log path="/metadata" :Metacat: init |
Also available in: Unified diff
To make installation instruction clearer.