1 |
3585
|
barseghian
|
<!DOCTYPE html PUBLIC "-//W3C//DTD html 4.0//EN">
|
2 |
|
|
<html>
|
3 |
|
|
|
4 |
|
|
<head>
|
5 |
|
|
<title>Metacat Install - Ubuntu</title>
|
6 |
3633
|
barseghian
|
<link rel="stylesheet" type="text/css" href="@docrooturl../@default.css">
|
7 |
3585
|
barseghian
|
</head>
|
8 |
|
|
|
9 |
|
|
<body>
|
10 |
|
|
|
11 |
|
|
<table class="tabledefault" width="100%">
|
12 |
3633
|
barseghian
|
<tr><td rowspan="2"><img src="@docrooturl../@images/KNBLogo.gif"></td>
|
13 |
3585
|
barseghian
|
<td colspan="7">
|
14 |
|
|
<div class="title">Metacat Install - Ubuntu</div>
|
15 |
|
|
</td>
|
16 |
|
|
</tr>
|
17 |
|
|
<tr>
|
18 |
|
|
<td><a href="@server@/" class="toollink"> KNB Home </a></td>
|
19 |
|
|
<td><a href="@server@/data.html" class="toollink"> Data </a></td>
|
20 |
|
|
<td><a href="@server@/people.html" class="toollink"> People </a></td>
|
21 |
|
|
<td><a href="@server@/informatics" class="toollink"> Informatics </a></td>
|
22 |
|
|
<td><a href="@server@/biodiversity" class="toollink"> Biocomplexity </a></td>
|
23 |
|
|
<td><a href="@server@/education" class="toollink"> Education </a></td>
|
24 |
|
|
<td><a href="@server@/software" class="toollink"> Software </a></td>
|
25 |
|
|
</tr>
|
26 |
|
|
</table>
|
27 |
|
|
<hr>
|
28 |
|
|
|
29 |
|
|
<table class="tabledefault" width="100%">
|
30 |
|
|
<td class="tablehead" colspan="2"><p class="emphasis">Installing Metacat on Ubuntu</p></td>
|
31 |
|
|
<tr>
|
32 |
|
|
<td>
|
33 |
|
|
<p class="emphasis">
|
34 |
|
|
Assumes you have the base ubuntu distribution set up already.
|
35 |
|
|
</p>
|
36 |
|
|
</td>
|
37 |
|
|
</tr>
|
38 |
|
|
</table>
|
39 |
|
|
|
40 |
|
|
<h2>Repositories</h2>
|
41 |
|
|
<pre>
|
42 |
|
|
* Add the extra repositories to your apt sources list.
|
43 |
|
|
sudo gedit /etc/apt/sources.list
|
44 |
|
|
# add universe and multiverse to the following lines
|
45 |
|
|
deb http://us.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
|
46 |
|
|
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
|
47 |
|
|
sudo apt-get update
|
48 |
|
|
</pre>
|
49 |
|
|
|
50 |
|
|
<h2>Ubuntu Package Dependencies</h2>
|
51 |
|
|
<pre>
|
52 |
|
|
* Install the ubuntu package dependencies
|
53 |
|
|
sudo apt-get install tomcat5-webapps postgresql-server-dev-8.1 postgresql-8.1 sun-java5-jdk \
|
54 |
|
|
apache2 cvs
|
55 |
|
|
</pre>
|
56 |
|
|
|
57 |
|
|
<h2>java jdk</h2>
|
58 |
|
|
<pre>
|
59 |
|
|
* Tell the ubuntu system to use the java jdk
|
60 |
|
|
sudo update-java-alternatives -s java-1.5.0-sun
|
61 |
|
|
|
62 |
|
|
sudo vi /etc/default/tomcat5
|
63 |
|
|
JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
|
64 |
|
|
.......
|
65 |
|
|
CATALINA_OPTS="-Djava.awt.headless=true -Djava.util.prefs.syncInterval=2000000 -Xmx512M -server"
|
66 |
|
|
....
|
67 |
|
|
TOMCAT_SECURITY=no
|
68 |
|
|
|
69 |
|
|
sudo /etc/init.d/tomcat5 restart
|
70 |
|
|
</pre>
|
71 |
|
|
|
72 |
|
|
<h2>Checkout Metacat</h2>
|
73 |
|
|
<pre>
|
74 |
|
|
* Download metacat from CVS and set up utilites
|
75 |
|
|
|
76 |
|
|
mkdir ~/workspace; cd ~/workspace
|
77 |
|
|
cvs -d:ext:perry@cvs.ecoinformatics.org:/cvs co metacat
|
78 |
|
|
cvs -d:ext:perry@cvs.ecoinformatics.org:/cvs co utilities
|
79 |
|
|
cd utilities
|
80 |
|
|
ant clean jar
|
81 |
|
|
cd ../metacat
|
82 |
|
|
</pre>
|
83 |
|
|
|
84 |
|
|
<h2>prep postgres</h2>
|
85 |
|
|
|
86 |
|
|
<pre>
|
87 |
|
|
# Setting up the postgres metacat db
|
88 |
|
|
sudo vi /etc/postgresql/8.1/main/pg_hba.conf
|
89 |
|
|
# add
|
90 |
|
|
host metacat metacat 127.0.0.1 255.255.255.255 password
|
91 |
|
|
sudo su postgres
|
92 |
|
|
createdb metacat
|
93 |
|
|
psql -d metacat
|
94 |
|
|
create user metacat with unencrypted password 'metacatpass';
|
95 |
|
|
\q
|
96 |
|
|
exit
|
97 |
|
|
</pre>
|
98 |
|
|
|
99 |
|
|
<h2>restart postgres</h2>
|
100 |
|
|
<pre>
|
101 |
|
|
sudo /etc/init.d/postgresql-8.1 restart
|
102 |
|
|
|
103 |
|
|
# TEST
|
104 |
|
|
psql -U metacat -W -h localhost metacat
|
105 |
|
|
</pre>
|
106 |
|
|
|
107 |
|
|
<h2>Build</h2>
|
108 |
|
|
<pre>
|
109 |
|
|
sudo touch /var/lib/tomcat5/webapps/knb.war
|
110 |
|
|
sudo chown perry /var/lib/tomcat5/webapps/knb.war
|
111 |
|
|
cd ~/workspace/metacat
|
112 |
|
|
cp build.properties default.build.properties
|
113 |
|
|
# Edit build.properties
|
114 |
|
|
vi lib/metacat.properties
|
115 |
|
|
|
116 |
|
|
#change
|
117 |
|
|
onlySecureLDAPConnection=false
|
118 |
|
|
# TODO set up the certificate *********
|
119 |
|
|
|
120 |
|
|
ant clean install
|
121 |
|
|
# may need to give cvs password a few times on the first build
|
122 |
|
|
</pre>
|
123 |
|
|
|
124 |
|
|
<h2>Postgres configuration</h2>
|
125 |
|
|
<pre>
|
126 |
|
|
psql -U metacat -W -h localhost -f build/src/xmltables-postgres.sql metacat
|
127 |
|
|
ant register-schemas
|
128 |
|
|
</pre>
|
129 |
|
|
|
130 |
|
|
<h2>apache / tomcat integration</h2>
|
131 |
|
|
<pre>
|
132 |
|
|
#the instructions at <a href="http://www.ubuntuforums.org/showthread.php?t=219985">http://www.ubuntuforums.org/showthread.php?t=219985</a> cover this pretty well
|
133 |
|
|
#remember to add the 'knb' servlet context
|
134 |
|
|
|
135 |
|
|
* Make sure metacat_data and metacat_inline_data folders are readable/writable by tomcat user
|
136 |
|
|
</pre>
|
137 |
|
|
|
138 |
|
|
|
139 |
|
|
</body>
|
140 |
|
|
</html>
|