Project

General

Profile

metacat / docs / user / metacat-source-build.html @ 4667

1
<!-- 
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: 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 Source Download and Build Instructions</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 Source Download and Build Instructions</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="#GetSource">Get Metacat Source</a></div>
48
      <div class="toc2"><a href="#SourceDistribution">Source Distribution</a></div> 
49
      <div class="toc2"><a href="#SVN">SVN Checkout</a></div>
50
    <div class="toc1"><a href="#BuildFromSource">Build From Source</a></div>
51
      <div class="toc2"><a href="#PrepareBuild">Prepare Build</a></div>
52
      <div class="toc2"><a href="#DoAntBuild">Do Ant Build</a></div>
53
  </div> 
54

    
55
<a name="Intro"></a><div class="header1">Introduction</div>
56
  <p>Metacat source can be downloaded either by getting and extracting the 
57
  source distribution, or by checking out the code from the repository.</p>
58
  
59
  <p>Reasons for choosing one versus the other might be:</p>
60
  <ul>
61
  <li>Source Distribution - this is a faster download since the code is compressed.  You
62
  might choose this if you want a stable versioned release, but you prefer to have
63
  all of your applications built on the server where it will run.  (Although it shouldn't
64
  matter where a java application is built.)</li>
65
  <li>SVN Checkout - there are several reasons for choosing a checked out version of 
66
  the code.  One is that you may want to build from the head of the code to pick up
67
  new changes that are not yet in a versioned build.  Conversely, you may want to build
68
  off of an older tag, to avoid an issue that was introduced in a build.  Lastly, you 
69
  may want to develop and submit code to the Metacat repository</li>
70
  </ul>
71
  
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>
75
  
76
  <p>Otherwise, you can get ant from
77
  <a href="http://ant.apache.org/">The Apache Ant homepage</a></p>
78
  
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>
86
  
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>
92
  
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
 
99

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

    
102
  <a name="SourceDistribution"></a><div class="header2">Source Distribution</div>  
103
    <p>To get the Metacat source distribution, browse to the 
104
      <a href="http://knb.ecoinformatics.org/software/download.html">KNB Software Download Page</a>.
105
      In the Metacat section, for Linux based systems, select the link that looks like:</p>
106
          <div class="code">metacat-src-X.X.X.tar.gz</div>
107
          <p>for Windows systems, select the link that looks like:</p>
108
          <div class="code">metacat-src-X.X.X.zip</div>
109
    <p>where X.X.X is the latest version of Metacat.  Choose to save the file locally in the directory 
110
    where your source should live.</p>
111
    <p>Extract the Metacat package files on Linux systems by typing:
112
      <div class="code">tar -xvzf metacat-src-X.X.X.tar.gz</div>
113
    <p>or, on Windows, use your system unzip utility to extract the zip file.</p>
114
    <p>Rename the metacat-X.X.X directory to metacat.</p>
115
 
116
  <a name="SVN"></a><div class="header2">SVN Checkout</div> 
117
    <p>To check out the code from SVN, go to the directory where you would like the code 
118
    to live and type:</p>
119
      <div class="code">svn co https://code.ecoinformatics.org/code/metacat/tags/METACAT_&lt;rev&gt; metacat</div>
120
    <p>Where &lt;rev&gt; is the version of the code you want to check out (like 1_9). </p>
121
    
122
    <p>If you are trying to check out the head, type:</p>
123
      <div class="code">svn co https://code.ecoinformatics.org/code/metacat/trunk metacat</div>
124
      
125
    <p>You should see a list of files as they check out.</p>
126
    
127
  <a name="BuildFromSource"></a><div class="header1">Build From Source</div>
128
     <p>You should now have the Metacat source in a directory named "metacat" in your
129
     code directory (We will refer to the metacat source directory as &lt;metacat_src_dir&gt;.
130
     
131
  <a name="PrepareBuild"></a><div class="header2">Prepare Build</div>   
132
    <p>Edit the file at:</p>
133
      <div class="code">&lt;metacat_src_dir&gt;/build.properties</div> 
134
    <p>Make sure that the "build.tomcat.dir" property is set to your tomcat installation
135
    directory.  For instance:</p>
136
      <div class="code">build.tomcat.dir=/usr/local/tomcat</div>
137
    <p>Metacat will use some of the native Tomcat libraries during the build.</p>
138
    
139
    <p>If your cvs user is something other than the user your are logged in as, you
140
    will need to change the ${env.USER} part of the cvsroot property to be your cvs 
141
    user.  For instance:</p>
142
      <div class="code">cvsroot=:ext:cvs-user@cvs.ecoinformatics.org:/cvs</div>
143
    <p> where your cvs user name is "cvs-user"</p> 
144
    
145
  <a name="DoAntBuild"></a><div class="header2">Do Ant Build</div>   
146
    <p>In the &lt;metacat_src_dir&gt;, run: </p>
147
      <div class="code">ant clean build-metacat</div>
148
      
149
    <p>You will see the individual modules get built.  You will be prompted
150
    for your cvs password several times.  You should see a "BUILD SUCCESSFUL"
151
    message at the end.</p>
152
    
153
    <p>You should see a new file named:</p>
154
      <div class="code">&lt;metacat_src_dir&gt;/dist/knb.war</div>
155
      
156
  <br>
157
    
158
</body>
159
</html>