Project

General

Profile

« Previous | Next » 

Revision 4607

Added by walbridge about 16 years ago

Update registry instructions style, initial steps.

View differences:

docs/user/registry_installation.html
9 9
  <style type="text/css">
10 10
/*<![CDATA[*/
11 11
  ol.decimal { list-style-type: decimal; }
12
	li { padding-bottom: 5px; }
13
	blockquote { 
14
		background-color: #f5f5f5;
15
		margin: 10px 15px 5px 20px;
16
		padding: 1px 0px 1px 10px;
17
	}
18

  
19
	.keyword {
20
		color: #00008b;
21
	}
22

  
23
	.type {
24
		color: #2b91af;
25
	}
26

  
27
	.string {
28
		color: #810541;
29
	}
30

  
12 31
  /*]]>*/
13 32
  </style>
14 33

  
......
86 105
  <ol class="decimal">
87 106
    <li>
88 107
      <p>Download and extract the Metacat release:</p>
89
      <pre>
90
<code>mkdir metacat &amp;&amp; cd metacat 
91
wget http://knb.ecoinformatics.org/software/dist/metacat-src-1.8.0.zip
92
unzip metacat-src-1.8.0.zip
93
cd metacat-1.8.0
94
export METACAT=`pwd`
95
</code>
108
      <blockquote>
109
<pre><span class="type">mkdir</span> metacat &amp;&amp; cd metacat 
110
<span class="type">wget</span> http://knb.ecoinformatics.org/software/dist/metacat-src-1.8.0.zip
111
<span class="type">unzip</span> metacat-src-1.8.0.zip
112
<span class="type">cd</span> metacat-1.8.0
113
<span class="type">export</span> METACAT=`pwd`
96 114
</pre>
115
</blockquote>
97 116
    </li>
98 117

  
99 118
    <li>
100 119
      <p>Build the Metacat Perl client library:</p>
101
      <pre>
102
<code>cd $METACAT/src/perl/Metacat
103
perl Makefile.PL
104
make
105
sudo make install
106
</code>
120
      <blockquote>
121
<pre><span class="type">cd</span> $METACAT/src/perl/Metacat
122
<span class="type">perl</span> Makefile.PL
123
<span class="type">sudo make</span>
124
<span class="type">sudo make install</span>
107 125
</pre>
126
</blockquote>
108 127
    </li>
109 128

  
110 129
    <li>
111
      <p>Install the system libraries needed. On Redhat:</p>
112
      <pre>
113
<code>sudo yum install gcc libxml2-devel libxslt-devel ant -y
114
</code>
130
      <p>Install the system libraries needed. On Redhat:
131
      <blockquote>
132
<pre><span class="type">sudo yum install</span> gcc libxml2-devel libxslt-devel ant -y
115 133
</pre>
134
</blockquote>
116 135

  
117
      <p>On Debian:
118
      <pre><code>
119
sudo apt-get install ant libappconfig-perl libxml-libxml-perl libxml-libxslt-perl libtemplate-perl \
120
libcgi-session-perl libdigest-sha1-perl libnet-ldap-perl libterm-readkey-perl libxml-dom-perl libsoap-lite-perl -y
121
</code></pre>
136
      On Debian:
137
      <blockquote>
138
			<pre>
139
<span class="type">sudo apt-get install</span> ant libappconfig-perl libxml-libxml-perl libxml-libxslt-perl \
140
libtemplate-perl libcgi-session-perl libdigest-sha1-perl libnet-ldap-perl \ 
141
libterm-readkey-perl libxml-dom-perl libsoap-lite-perl -y
142
</pre>
143
</blockquote>
122 144
	  You will need to install one package using cpan
123
      <pre><code> sudo cpan -i Config::Properties</code></pre>
145
      <blockquote><pre><span class="type">sudo cpan</span> -i Config::Properties</pre></blockquote>
124 146

  
125
      Now, skip ahead to step 7. Debian users can avoid using CPAN, as apt-get installs the software they need.<br><br>
147
      Debian users should skip ahead to step 7.
126 148
</p>
127 149
    </li>
128 150

  
......
131 153
      dependencies for the registry and account management parts of
132 154
      Metacat. If asked to manually configure cpan, type 'no' and
133 155
      CPAN will be setup with its default values.</p>
134
      <pre>
135
<code>sudo yum install perl-CPAN
136
sudo cpan
137
</code>
156
      <blockquote>
157
<pre><span class="type">sudo yum install</span> perl-CPAN
158
<span class="type">sudo cpan</span>
138 159
</pre>
160
</blockquote>
139 161

  
140 162
      <p>You should now see a prompt which looks like:</p>
141
      <pre>
142
<code>cpan&gt; 
143
</code>
163
      <blockquote>
164
<pre><span class="string">cpan&gt;</span>
144 165
</pre>
166
</blockquote>
145 167

  
146 168
      <p>The rest of the commands will assume you're inside of
147 169
      CPAN. Let's get the most recent version of the CPAN software.
148 170
      Just press return after any prompts you recieve during this
149 171
      process.</p>
150
      <pre>
151
<code>install Bundle::CPAN
152
reload cpan`
153
</code>
172
      <blockquote>
173
<pre>install Bundle::CPAN
174
reload cpan
154 175
</pre>
176
</blockquote>
155 177
    </li>
156 178

  
157 179
    <li>
......
159 181
      LibXSLT, as the current one requires a newer libxslt than is
160 182
      available on Redhat 4 &amp; 5. Again, just answer 'yes' to
161 183
      any questions.</p>
162
      <pre>
163
<code>install AutoLoader
184
      <blockquote>
185
<pre>install AutoLoader
164 186
install CGI
165 187
install CGI::SEssion
166 188
install LWP::UserAgent
......
168 190
install Template 
169 191
install URI
170 192
install MSERGEANT/XML-LibXSLT-1.58.tar.gz
171
</code>
172 193
</pre>
194
</blockquote>
173 195
    </li>
174 196

  
175 197
    <li>
......
178 200
      scripts will be installed into, with a default of
179 201
      '/var/www/cgi-knb'. To install the registry and the account
180 202
      manager to this folder we'll run ant:</p>
181
      <pre>
182
<code>cd $METACAT
183
sudo ant install-registry
184
sudo ant insall-ldap
185
</code>
203
      <blockquote>
204
<pre><span class="type">cd</span> $METACAT
205
<span class="type">sudo ant</span> install-registry
206
<span class="type">sudo ant</span> insall-ldap
186 207
</pre>
208
</blockquote>
187 209
    </li>
188 210

  
189 211
    <li>
190 212
      <p>A registry instance can support one or more skins. Skins
191 213
      provide a mechanism for giving a custom look to your Metacat
192 214
      installation, but require integration work to initially
193
      create. For this example, we'll use the <code>nceas</code>
215
      create. For this example, we'll use the <pre>nceas</pre>
194 216
      skin provided with Metacat. First, we'll want to install the
195 217
      skin:</p>
196
      <pre>
197
<code>sudo ant install-skin
198
</code>
218
      <blockquote>
219
<pre><span class="type">sudo ant</span> install-skin
199 220
</pre>
221
</blockquote>
200 222

  
201
      <p>When prompted, type <code>nceas</code>.</p>
223
      <p>When prompted, type <pre><span class="string">nceas</span></pre>.</p>
202 224
    </li>
203 225

  
204 226
    <li>
......
207 229
      space to store uploaded files. If you'd like your registry to
208 230
      allow file uploads, we'll need to make sure Apache can write
209 231
      to it. The apache user varies from machine to machine, but
210
      typically it will be either <code>www-data</code> or
211
      <code>apache</code>. Once finding your appropriate apache
232
      typically it will be either
233
			<pre><code>www-data</code> or <code>apache</code></pre>. 
234
			Once finding your appropriate apache
212 235
      user, we'll want to change ownership of a few files, here
213 236
      using the user <code>apache</code>:</p>
214
      <pre>
215
<code>sudo chown apache /tmp/knb
216
</code>
237
      <blockquote>
238
<pre><span class="type">sudo chown</span> apache /tmp/knb
217 239
</pre>
240
</blockquote>
218 241

  
219 242
      <p>Each skin has a 'lastid' file, which controls which the
220 243
      accession numbers metacat generates. As with the temporary
221 244
      folder, we'll want the registry to be able to write to this
222 245
      file, replacing the skin name with the skin you're planning
223 246
      on using:</p>
224
      <pre>
225
<code>sudo touch /var/www/org.ecoinformatics.knb/knb/style/skins/nceas/nceas.lastid
247
      <blockquote>
248
<pre>sudo touch /var/www/org.ecoinformatics.knb/knb/style/skins/nceas/nceas.lastid
226 249
sudo chown apache /var/www/org.ecoinformatics.knb/knb/style/skins/nceas/nceas.lastid
227
</code>
228 250
</pre>
251
</blockquote>
229 252

  
230 253
      <p>You'll need to have one lastid file for each skin your
231 254
      site will support.</p>
......
234 257
    <li>
235 258
      <p>Configure Apache to serve up the pages we've just
236 259
      configured. In your httpd.conf or equivalent, add:</p>
237
      <pre>
238
<code>ScriptAlias /cgi-bin/ "/var/www/cgi-knb/"
260
      <blockquote>
261
<pre>ScriptAlias /cgi-bin/ "/var/www/cgi-knb/"
239 262
&lt;Directory "/var/www/cgi-knb"&gt;
240 263
    AllowOverride None
241 264
    Options ExecCGI
242 265
    Order allow,deny
243 266
    Allow from all
244 267
&lt;/Directory&gt;`
245
</code>
246 268
</pre>
269
</blockquote>
247 270

  
248 271
      <p>Then reload Apache:</p>
249
      <pre>
250
<code>/etc/init.d/httpd reload
251
</code>
272
      <blockquote>
273
<pre>/etc/init.d/httpd reload
252 274
</pre>
275
</blockquote>
253 276
    </li>
254 277
    
255 278
    <li>
256 279
      <p>Change owner and access permission of some credential files:</p>
257
      <pre>
258
<code>cd /webapps/knb/style/skins/</code>
259
<code>find . -name "*.cfg" -exec chmod 600 {} \;</code>
260
<code>find . -name "*.cfg" -exec chown apache {} \;</code>
261
</pre>
280
      <blockquote>
281
<pre>cd /webapps/knb/style/skins/</pre>
282
<pre>find . -name "*.cfg" -exec chmod 600 {} \;</pre>
283
<pre>find . -name "*.cfg" -exec chown apache {} \;</pre>
284
</blockquote>
262 285

  
263 286
<p>Note: "/webapps/knb" is subject to change base on your configuration.</p>
264
<p>         "apache" user is the one who runs httpd server.</p
287
<p>         "apache" user is the one who runs httpd server.</p>
265 288
 
266 289
      <p>Those commands will make the files which contain credentials are not accessible
267 290
      from web browsers. </p>
......
269 292

  
270 293
    <li>
271 294
      <p>Now visit the resulting URL:</p>
272
      <pre>
273
<code>http://localhost/cgi-bin/register-dataset.cgi?cfg=nceas
274
</code>
295
      <blockquote>
296
<pre>http://localhost/cgi-bin/register-dataset.cgi?cfg=nceas
275 297
</pre>
298
</blockquote>
276 299

  
277 300
      <p>If everything worked correctly, you should see a page like
278 301
      this: <img src="images/registry-login.jpg" alt=
......
293 316
      can be obtained from the <a href=
294 317
      "http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html">
295 318
      oracle website</a>.</p>
296
      <pre>
297
<code>rpm -i oracle-instantclient-basic-10.2.0.3-1.i386.rpm
319
      <blockquote>
320
<pre>rpm -i oracle-instantclient-basic-10.2.0.3-1.i386.rpm
298 321
rpm -i oracle-instantclient-devel-10.2.0.3-1.i386.rpm
299 322
rpm -i oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm
300
</code>
301 323
</pre>
324
</blockquote>
302 325
    </li>
303 326

  
304 327
    <li>
305
      <p>Next, we'll need an <code>tnsnames.ora</code> file for
328
      <p>Next, we'll need an <pre>tnsnames.ora</pre> file for
306 329
      Oracle to locate the server we're connecting to. In this
307 330
      example, we'll copy it from a remote location:</p>
308
      <pre>
309
<code>mkdir -p /usr/lib/oracle/10.2.0.3/network/admin/ &amp;&amp; cd !$
331
      <blockquote>
332
<pre>mkdir -p /usr/lib/oracle/10.2.0.3/network/admin/ &amp;&amp; cd !$
310 333
scp walbridge@knb.ecoinformatics.org:/usr/lib/oracle/10.1.0.4/network/admin/tnsnames.ora .
311
</code>
312 334
</pre>
335
</blockquote>
313 336
    </li>
314 337

  
315 338
    <li>
316 339
      <p>The AdminDB is accessed via Perl, so install the needed
317 340
      Oracle driver using CPAN:</p>
318
      <pre>
319
<code>cpan
341
      <blockquote>
342
<pre>cpan
320 343
install DBI
321 344
install DBD::Oracle
322
</code>
323 345
</pre>
346
</blockquote>
324 347
    </li>
325 348

  
326 349
    <li>
327 350
      <p>Now we can install the AdminDB module itself:</p>
328
      <pre>
329
<code>mkdir -p ~/projects/admindb &amp;&amp; cd !$
351
      <blockquote>
352
<pre>mkdir -p ~/projects/admindb &amp;&amp; cd !$
330 353
export CVSROOT=:ext:walbridge@cvs.nceas.ucsb.edu:/cvsnceas
331 354
cvs co admindb
332 355
cd admindb/perl/NCEAS/AdminDB
333 356
perl Makefile.PL
334 357
make
335 358
sudo make install
336
</code>
337 359
</pre>
360
</blockquote>
338 361
    </li>
339 362

  
340 363
    <li>
341 364
      <p>Finally, set the correct properties in the
342
      <code>nceas.cfg</code> file:</p>
343
      <pre>
344
<code>nceas_db = //hyperion.nceas.ucsb.edu:1521/nceasp.nceas.ucsb.edu
365
      <pre>nceas.cfg</pre> file:</p>
366
      <blockquote>
367
<pre>nceas_db = //hyperion.nceas.ucsb.edu:1521/nceasp.nceas.ucsb.edu
345 368
nceas_db_user = admowner
346 369
nceas_db_password = NCEAS_DB_READ_PASSWORD_HERE
347
</code>
348 370
</pre>
371
</blockquote>
349 372
    </li>
350 373

  
351 374
    <li>
352
      <p>A quick check of <code>register-dataset.cgi</code> should
375
      <p>A quick check of <pre>register-dataset.cgi</pre> should
353 376
      now show a complete list of projects: <img src=
354 377
      "images/registry-nceas-projects.png" alt=
355 378
      "NCEAS Project list" /></p>

Also available in: Unified diff