Project

General

Profile

Revision 4610

Added by walbridge about 12 years ago

Removed obsolete steps thanks to 1.9's new location of cgi-bin and the included Apache configuration

View differences:

registry_installation.html
195 195
    </li>
196 196

  
197 197
    <li>
198
      <p>As part of the Metacat setup, a property called
199
      'inst.cgi.dir' is set, which controls the location the perl
200
      scripts will be installed into, with a default of
201
      '/var/www/cgi-knb'. To install the registry and the account
202
      manager to this folder we'll run ant:</p>
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
207
</pre>
208
</blockquote>
209
    </li>
210

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

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

  
226
    <li>
227
      <p>Metacat uses the 'application.tempDir' property from 
228
      metacat.properties to set a temporary
229
      space to store uploaded files. If you'd like your registry to
230
      allow file uploads, we'll need to make sure Apache can write
231
      to it. The apache user varies from machine to machine, but
232
      typically it will be either
233
			<pre><code>www-data</code> or <code>apache</code></pre>. 
234
			Once finding your appropriate apache
235
      user, we'll want to change ownership of a few files, here
236
      using the user <code>apache</code>:</p>
237
      <blockquote>
238
<pre><span class="type">sudo chown</span> apache /tmp/knb
239
</pre>
240
</blockquote>
241

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

  
253
      <p>You'll need to have one lastid file for each skin your
254
      site will support.</p>
255
    </li>
256

  
257
    <li>
258
      <p>Configure Apache to serve up the pages we've just
259
      configured. In your httpd.conf or equivalent, add:</p>
260
      <blockquote>
261
<pre>ScriptAlias /cgi-bin/ "/var/www/cgi-knb/"
262
&lt;Directory "/var/www/cgi-knb"&gt;
263
    AllowOverride None
264
    Options ExecCGI
265
    Order allow,deny
266
    Allow from all
267
&lt;/Directory&gt;`
268
</pre>
269
</blockquote>
270

  
271
      <p>Then reload Apache:</p>
272
      <blockquote>
273
<pre>/etc/init.d/httpd reload
274
</pre>
275
</blockquote>
276
    </li>
277
    
278
    <li>
279
      <p>Change owner and access permission of some credential files:</p>
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>
285

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

  
293
    <li>
294 198
      <p>Now visit the resulting URL:</p>
295 199
      <blockquote>
296
<pre>http://localhost/cgi-bin/register-dataset.cgi?cfg=nceas
200
<pre>http://localhost/knb/cgi-bin/register-dataset.cgi?cfg=nceas
297 201
</pre>
298 202
</blockquote>
299 203

  
......
317 221
      "http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html">
318 222
      oracle website</a>.</p>
319 223
      <blockquote>
320
<pre>rpm -i oracle-instantclient-basic-10.2.0.3-1.i386.rpm
321
rpm -i oracle-instantclient-devel-10.2.0.3-1.i386.rpm
322
rpm -i oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm
224
<pre><span class="type">rpm -i</span> oracle-instantclient-basic-10.2.0.3-1.i386.rpm
225
<span class="type">rpm -i</span> oracle-instantclient-devel-10.2.0.3-1.i386.rpm
226
<span class="type">rpm -i</span> oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm
323 227
</pre>
324 228
</blockquote>
325 229
    </li>
......
329 233
      Oracle to locate the server we're connecting to. In this
330 234
      example, we'll copy it from a remote location:</p>
331 235
      <blockquote>
332
<pre>mkdir -p /usr/lib/oracle/10.2.0.3/network/admin/ &amp;&amp; cd !$
333
scp walbridge@knb.ecoinformatics.org:/usr/lib/oracle/10.1.0.4/network/admin/tnsnames.ora .
236
<pre><span class="type">mkdir -p</span> /usr/lib/oracle/10.2.0.3/network/admin/ &amp;&amp; <span class="type">cd !$</span>
237
<span class="type">scp</span> walbridge@knb.ecoinformatics.org:/usr/lib/oracle/10.1.0.4/network/admin/tnsnames.ora .
334 238
</pre>
335 239
</blockquote>
336 240
    </li>

Also available in: Unified diff