Project

General

Profile

« Previous | Next » 

Revision 4646

Added by daigle about 16 years ago

Add metacat source build instructions and apache configuration instructions.

View differences:

docs/user/metacat-install.html
376 376
  <p>
377 377
    Install Tomcat into the directory of your choice. The directory in which 
378 378
    you install Tomcat itself will be referred to as the &lt;tomcat_home&gt;.
379
    We recommend that you install Tomcat version 5.5.  More details about 
380
    Tomcat installation are available <a href=" http://jakarta.apache.org/tomcat/index.html">here</a>.
379
    We recommend that you install Tomcat version 5.5.  If you are running 
380
    Ubuntu/Debian, you can get Tomcat by typing:</p>
381
      <div class="code">sudo apt-get install tomcat5.5</div>
382
    Otherwise, you can get Tomcat from <a href=" http://jakarta.apache.org/tomcat/index.html">the Apache Tomcat page</a>.
381 383
  </p>
382 384

  
383 385
<a name="DownloadingMetacat"></a><div class="header1">Download Metacat and Get War File</div>
......
440 442
  <a name="InstallMetacatWar"></a><div class="header2">Install Metacat War</div> 
441 443
    <p>Copy the war file to Tomcat:</p>
442 444
	  <div class="code">sudo cp knb.war &lt;tomcat_app_dir&gt;</div>
445
	  
446
  <a name="ApacheConfig"></a><div class="header2">Configure Apache</div> 
447
    <p>You have the option of running Tomcat stand-alone or with with the Apache web
448
    server.  Running with Apache is the more traditional setup since Apache is a 
449
    more robust web server.  There are some initial setup steps to get Apache talking
450
    to the Metacat application at the </p>
451
	  <a href="./metacat-apache-config.html"> the Metacat Apache Configuration page</a></p>
443 452

  
444 453
<a name="UpgradingMetacat"></a><div class="header1">Upgrading Existing Metacat</div>
445 454
  <a name="protocol"></a>
docs/user/metacat-apache-config.html
1
<!-- 
2
  *   '$RCSfile$'
3
  *     Purpose: web page describing the installation of Metacat
4
  *   Copyright: 2008 Regents of the University of California and the
5
  *               National Center for Ecological Analysis and Synthesis
6
  *     Authors: Chad Berkley
7
  *
8
  *    '$Author: daigle $'
9
  *    '$Date: 2008-11-24 11:57:40 -0800 (Mon, 24 Nov 2008) $'
10
  *    '$Revision: 4621 $'
11
  *
12
  *
13
  -->
14
  
15
<!DOCTYPE html PUBLIC "-//W3C//DTD html 4.0//EN">
16
<html>
17

  
18
<head>
19
  <title>Metacat Apache Configuration</title>
20
  <link rel="stylesheet" type="text/css" href="./common.css">
21
  <link rel="stylesheet" type="text/css" href="./default.css">
22
</head>
23

  
24
<body>
25

  
26
<table class="tabledefault" width="100%">
27
<tr><td rowspan="2"><img src="./images/KNBLogo.gif"></td>
28
<td colspan="7">
29
<div class="title">Metacat Apache Configuration</div>
30
</td>
31
</tr>
32
<tr>
33
  <td><a href="/" class="toollink"> KNB Home </a></td>
34
  <td><a href="/data.html" class="toollink"> Data </a></td>
35
  <td><a href="/people.html" class="toollink"> People </a></td>
36
  <td><a href="/informatics" class="toollink"> Informatics </a></td>
37
  <td><a href="/biodiversity" class="toollink"> Biocomplexity </a></td>
38
  <td><a href="/education" class="toollink"> Education </a></td>
39
  <td><a href="/software" class="toollink"> Software </a></td>
40
</tr>
41
</table>
42
<hr>
43

  
44
<div class="header1">Table of Contents</div>
45
  <div class="toc">
46
    <div class="toc1"><a href="#Intro">Introduction</a></div>
47
    <div class="toc1"><a href="#UbuntuConfig">Unbuntu/Debian Configuration</a></div>
48
      <div class="toc2"><a href="#ModJK">Set Up Mod JK</a></div>
49
      <div class="toc2"><a href="#SetUpKnb">Set Up Metacat Site</a></div>
50
      <div class="toc2"><a href="#LsidConfig">LSID Service Configuration</a></div>
51
      <div class="toc2"><a href="#UbuntuReloadApache">Reload Apache</a></div>
52
    <div class="toc1"><a href="#OtherConfig">Other O/S Configuration</a></div>
53
  </div> 
54

  
55
<a name="Intro"></a><div class="header1">Introduction</div>
56
  <p>If you are going to run Tomcat behind the Apache web server, you have some additional
57
  setup to perform.  One of the reasons for recommending the Ubuntu Linux O/S is its 
58
  ease of setup.  This becomes abundantly clear when configuring Apache.  We will
59
  address Ubuntu/Debian configurations separately from all other configurations.</p>
60
  
61
<a name="UbuntuConfig"></a><div class="header1">Unbuntu/Debian Configuration</div>  
62
   <p>If you are installing on an Ubuntu/Debian system, and you installed Apache using 
63
   apt-get, the Metacat code will have helper files that can be dropped into directories 
64
   to configure Apache.  Depending on whether you are installing from binary distribution 
65
   or source, these helper files will be in one of two locations:
66
   
67
   <ul>
68
   <li>Installing From Binary Distribution - the helper files will be located in the 
69
   directory where you extracted the distribution.</li>
70
   <li>Installing From Source - regardless if it's a source distribution or source that 
71
   you checked out from the SVN repository, the helper files will be located in:
72
     <div class="code">&lt;metacat_code_dir&gt;/src/scripts</div></li>
73
   </ul>
74
   <p>We will refer to the directory with the helper scripts as &lt;metacat_helper_dir&gt;</p>
75
   <p>We will refer to the directory where Apache is installed as &lt;apache_install_dir&gt;</p>
76
   
77
   <a name="ModJK"></a><div class="header2">Set Up Mod JK</div>
78
	<p>Apache uses a module called Mod JK to talk to Tomcat applications.  If you haven't done so 
79
	already, you can install it by typing:</p>	
80
	  <div class="code">sudo apt-get install libapache2-mod-jk</div>
81
	<p>The helper files that configure the interface between Apache and Tomcat are jk.conf and workers.properties.
82
	To install these files:</p>
83
      <div class="code">sudo cp &lt;metacat_helper_dir&gt;/jk.conf &lt;apache_install_dir&gt;/mods-available/</div>
84
      <div class="code">sudo cp &lt;metacat_helper_dir&gt;/workers.properties &lt;apache_install_dir&gt;</div>
85
    <p>Disabling and re-enabling the Apache Mod JK module will pick up the new changes:</p>
86
      <div class="code">sudo a2dismod jk</div>
87
      <div class="code">sudo a2enmod jk</div>
88
    
89
   <a name="SetUpKnb"></a><div class="header2">Set Up Metacat Site</div>   
90
    <p>Next, Apache needs to know about the Metacat site.  The helper file named "knb" has rules that
91
    tell Apache which traffic to route to Metacat.  Set up the knb (Metacat) site by dropping the 
92
    knb file into the sites-available directory and running the a2ensite to enable the site:</p>
93
      <div class="code">sudo cp &lt;metacat_helper_dir&gt;/knb &lt;apache_install_dir&gt;/sites-available</div>
94
      <div class="code">sudo a2ensite knb</div>
95
      
96
    <a name="LsidConfig"></a><div class="header2">LSID Service Configuration</div>   
97
    <p>If you want to run an optional LSID server along with the Metacat server, set up and enable the authority service site 
98
      configurations by typing:</p>
99
      <div class="code">sudo cp &lt;metacat_helper_dir&gt;/authority &lt;apache_install_dir&gt;/sites-available</div>
100
      <div class="code">sudo a2ensite authority</div>
101
      
102
    <a name="UbuntuReloadApache"></a><div class="header2">Reload Apache</div>
103
    <p>Reload apache to bring in changes by typing:</p>
104
      <div class="code">sudo /etc/init.d/apache2 force-reload</div>
105
  
106
<a name="OtherConfig"></a><div class="header1">Other O/S Configuration</div>
107
  <p>If you are running on an O/S other than Ubuntu/Debian or you installed the
108
  Apache source or binary, you will need to manually edit the Apache configuration
109
  file.</p> 
110
     
111
  <p>We will refer to the directory where Apache is installed as &lt;apache_install_dir&gt;</p>
112
  
113
  <p>Edit:</p>
114
    <div class="code">&lt;apache_install_dir&gt;/conf/httpd.conf</div>
115
   
116
  <a name="ModJkLog"></a><div class="header2">Mod JK Log Configuration</div>
117
    <p> You should configure the log location and level for Mod JK.  If you do not
118
    already have a section like this, you should add it.</p>  
119
    
120
    <div class="code">
121
    &lt;IfModule mod_jk.c&gt;<br>
122
       &nbsp;&nbsp;JkLogFile "/var/log/tomcat/mod_jk.log"<br>
123
       &nbsp;&nbsp;JkLogLevel info<br>
124
    &lt;/IfModule&gt;
125
    </div>
126
    
127
    <p>You can set the log location to any place you like</p>
128

  
129
  <a name="VirtualHost"></a><div class="header2">Virtual Host Configuration</div>  
130
  <p>The following section configures apache to talk to route traffic to the Metacat
131
  application.</p>
132
    <div class="code">
133
    &lt;VirtualHost XXX.XXX.XXX.XXX:80&gt;<br>
134
      &nbsp;&nbsp;DocumentRoot /var/www<br>
135
      &nbsp;&nbsp;ServerName dev.nceas.ucsb.edu<br>
136
      &nbsp;&nbsp;ErrorLog /var/log/httpd/error_log<br>
137
      &nbsp;&nbsp;CustomLog /var/log/httpd/access_log common<br>
138
    <br>
139
      &nbsp;&nbsp;ScriptAlias /cgi-bin/ "/var/www/cgi-knb/"<br>
140
      &nbsp;&nbsp;&lt;Directory /var/www/cgi-knb/&gt;<br>
141
        &nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br>
142
        &nbsp;&nbsp;&nbsp;&nbsp;Options ExecCGI<br>
143
        &nbsp;&nbsp;&nbsp;&nbsp;Order allow,deny<br>
144
        &nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br>
145
      &nbsp;&nbsp;&lt;/Directory&gt;<br>
146
    <br>
147
      &nbsp;&nbsp;ScriptAlias /knb/cgi-bin/ "/var/www/webapps/knb/cgi-bin/"<br>
148
      &nbsp;&nbsp;&lt;Directory "/var/www/webapps/knb/cgi-bin/"&gt;<br>
149
        &nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br>
150
        &nbsp;&nbsp;&nbsp;&nbsp;Options ExecCGI<br>
151
        &nbsp;&nbsp;&nbsp;&nbsp;Order allow,deny<br>
152
        &nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br>
153
      &nbsp;&nbsp;&lt;/Directory&gt;<br>
154
    <br>
155
      &nbsp;&nbsp;JkMount /knb ajp13<br>
156
      &nbsp;&nbsp;JkMount /knb/* ajp13<br>
157
      &nbsp;&nbsp;JkMount /knb/metacat ajp13<br>
158
      &nbsp;&nbsp;JkUnMount /knb/cgi-bin/* ajp13<br>
159
      &nbsp;&nbsp;JkMount /*.jsp ajp13<br>
160
      &nbsp;&nbsp;JkMount /metacat ajp13<br>
161
      &nbsp;&nbsp;JkMount /metacat/* ajp13<br>
162
    &lt;/VirtualHost&gt;<br>
163
    </div>
164
    
165
    <p>Some notes:</p>
166
    <ul>
167
    <li>ServerName - should be set to the dns name where you will serve Metacat.</li>
168
    <li> ScriptAlias /knb/cgi-bin/ - this directive and the following Directory section
169
    should both point to the cgi-bin directory inside your Metacat installation.</li>
170
    </ul>
171
    
172

  
173
  <a name="WorkersProperties"></a><div class="header2">workers.properties file</div> 
174
   <p>You will need to drop a file named "workers.proerpties" file into your Apache 
175
   configuration directory, and edit the file to make sure all properties are correct.
176
   Metacat provides a base workers.properties file for you to use.  Depending on 
177
   whether you are installing from binary distribution or source, the workers.properties
178
   files will be in one of two locations:
179
   
180
   <ul>
181
   <li>Installing From Binary Distribution - the file will be located in the 
182
   directory where you extracted the distribution.</li>
183
   <li>Installing From Source - regardless if it's a source distribution or source that 
184
   you checked out from the SVN repository, the file will be located in:
185
     <div class="code">&lt;metacat_code_dir&gt;/src/scripts/workers.properties</div></li>
186
   </ul>   
187
   
188
   <p>Copy the workers.properties file into:</p>
189
     &lt;apache_install_dir&gt;/conf/
190
     
191
   <p>Edit the workers.properties file and make sure the following properties are
192
   set correctly:</p>
193
   <ul>
194
   <li>workers.tomcat_home - should be set to the Tomcat install directory on your system.</li>
195
   <li>workers.java_home  - should be set to the Java install directory on your system.</li>
196
   </ul> 
197
   
198
  <a name="LsidConfig"></a><div class="header2">LSID Service Configuration</div>   
199
    <p>If you want to run an optional LSID server along with the Metacat server, add the following lines to the
200
    VirtualHost section you configured above:</p>
201
      <div class="code">
202
        &nbsp;&nbsp;JkMount /authority ajp13<br>
203
        &nbsp;&nbsp;JkMount /authority/* ajp13<br>
204
      </div>
205
      
206
    <a name="UbuntuReloadApache"></a><div class="header2">Reload Apache</div>
207
    <p>Restart apache to bring in changes by typing:</p>
208
      <div class="code">sudo /etc/init.d/apache2 restart</div>
209
      
210
    <br>    
211
</body>
212
</html>
0 213

  
docs/user/metacat-source-build.html
69 69
  may want to develop and submit code to the Metacat repository</li>
70 70
  </ul>
71 71
  
72
  <p>In order to check out Metacat, you will need both Subversion (SVN) and CVS clients
73
  installed and configured on your system.  This is because, while Metacat has been 
74
  migrated to SVN, some of its supporting libraries (eml, utlities and seek) have not 
75
  yet been migrated.  Eventually, SVN will be the only versioning client you will need.  
76
  You will need to make sure you have the appropriate permissions on these systems</p>
72
  <p>You will also need Apache Ant to do the build.  If you have not already 
73
  installed Ant and you are running Ubuntu/Debian, you can get it by typing:</p>
74
    <div class="code">sudo apt-get install ant</div>
77 75
  
78
  <p>For more information on installing SVN and CVS, please visit the following sites:
76
  <p>Otherwise, you can get ant from
77
  <a href="http://ant.apache.org/">The Apache Ant homepage</a></p>
79 78
  
80
  <ul>
81
  <li><a href="http://subversion.tigris.org">The Subversion homepage</a></li>
82
  <li><a href="http://ximbiot.com/cvs/wiki/">The Ximbiot CVS homepage</a></li>
83
  </ul>
79
  <p>If you are checking out Metacat code from the SVN repository, you will need both 
80
  Subversion (SVN) and CVS clients installed and configured on your system.  Both are needed
81
  because, while Metacat has been migrated to SVN, some of its supporting libraries (eml, 
82
  utilities and seek) have not yet been migrated.  Eventually, SVN will be the only versioning 
83
  client you will need.  You will need to make sure you have the appropriate accounts on these 
84
  systems.  You won't have to worry about SVN or CVS if you are installing from a Metacat
85
  source distribution.  These have all the required dependencies built in.</p>
84 86
  
85
  </p>You will also need Apache Ant to do the build.  If you have not already 
86
  installed Ant, you can get it at:
87
  <p>If you have not already installed Subversion and you are running Ubuntu/Debian, you can 
88
  get it by typing:</p>
89
    <div class="code">sudo apt-get install subversion</div>
90
    
91
  <p>Otherwise, you can get if from <a href="http://subversion.tigris.org">The Subversion homepage</a></p>
87 92
  
88
  <ul>
89
  <li><a href="http://ant.apache.org/">The Apache Ant homepage</a></li>
90
  </ul>
93
  <p>If you have not already installed CVS and you are running Ubuntu/Debian, you can 
94
  get it by typing:</p>
95
    <div class="code">sudo apt-get install cvs</div>
96
    
97
  <p>Otherwise, you can get it from <a href="http://ximbiot.com/cvs/wiki/">The Ximbiot CVS homepage</a></p>
98
 
91 99

  
92 100
<a name="GetSource"></a><div class="header1">Get Metacat Source</div>
93 101

  
......
103 111
    <p>Extract the Metacat package files on Linux systems by typing:
104 112
      <div class="code">tar -xvzf metacat-src-X.X.X.tar.gz</div>
105 113
    <p>or, on Windows, use your system unzip utility to extract the zip file.</p>
106
    <p>You should see the full Metacat source tree.</p>
114
    <p>Rename the metacat-X.X.X directory to metacat.</p>
107 115
 
108 116
  <a name="SVN"></a><div class="header2">SVN Checkout</div> 
109 117
    <p>To check out the code from SVN, go to the directory where you would like the code 
110 118
    to live and type:</p>
111 119
      <div class="code">svn co https://code.ecoinformatics.org/code/metacat/tags/METACAT_&lt;rev&gt; metacat</div>
112
    Where &lt;rev&gt; is the version of the code you want to check out (like 1_9). </p>
120
    <p>Where &lt;rev&gt; is the version of the code you want to check out (like 1_9). </p>
113 121
    
114 122
    <p>If you are trying to check out the head, type:</p>
115 123
      <div class="code">svn co https://code.ecoinformatics.org/code/metacat/trunk metacat</div>
......
136 144
    
137 145
  <a name="DoAntBuild"></a><div class="header2">Do Ant Build</div>   
138 146
    <p>In the &lt;metacat_src_dir&gt;, run: </p>
139
      <div class="code">ant fullclean build-metacat</div>
147
      <div class="code">ant clean build-metacat</div>
140 148
      
141 149
    <p>You will see the individual modules get built.  You will be prompted
142 150
    for your cvs password several times.  You should see a "BUILD SUCCESSFUL"

Also available in: Unified diff