Files
DSpace/dspace/docs/html/ch03.html
Jeffrey Trimble 0bd461646d Final Revisions for 1.6.1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5002 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-05-21 16:39:25 +00:00

249 lines
80 KiB
HTML
Raw Blame History

<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter&nbsp;3.&nbsp;DSpace System Documentation: Installation</title><meta content="DocBook XSL Stylesheets V1.75.2" name="generator"><link rel="home" href="index.html" title="DSpace Manual"><link rel="up" href="index.html" title="DSpace Manual"><link rel="prev" href="ch02.html" title="Chapter&nbsp;2.&nbsp;DSpace System Documentation: Functional Overview"><link rel="next" href="ch04.html" title="Chapter&nbsp;4.&nbsp;DSpace System Documentation: Upgrading a DSpace Installation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF" marginwidth="5m"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Chapter&nbsp;3.&nbsp;DSpace System Documentation: Installation</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="ch02.html">Prev</a>&nbsp;</td><th align="center" width="60%">&nbsp;</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="ch04.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;3.&nbsp;DSpace System Documentation: Installation"><div class="titlepage"><div><div><h2 class="title"><a name="N10689"></a>Chapter&nbsp;3.&nbsp;<a name="docbook-install.html"></a>DSpace System Documentation: Installation</h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch03.html#N1068F">3.1. For the Impatient</a></span></dt><dt><span class="section"><a href="ch03.html#N106A8">3.2. Prerequisite Software</a></span></dt><dd><dl><dt><span class="section"><a href="ch03.html#N106B3">3.2.1. UNIX-like OS or Microsoft Windows</a></span></dt><dt><span class="section"><a href="ch03.html#N106C2">3.2.2. Sun Java JDK 5 or later (standard SDK is fine, you don't need J2EE)</a></span></dt><dt><span class="section"><a href="ch03.html#N106D7">3.2.3. Apache Maven 2.0.8 or later (Java build tool)</a></span></dt><dd><dl><dt><span class="section"><a href="ch03.html#N106E6">3.2.3.1. Configuring a Proxy</a></span></dt></dl></dd><dt><span class="section"><a href="ch03.html#N106F9">3.2.4. Apache Ant 1.7 or later (Java build tool)</a></span></dt><dt><span class="section"><a href="ch03.html#N10708">3.2.5. Relational Database: (PostgreSQL or Oracle).</a></span></dt><dt><span class="section"><a href="ch03.html#N1077F">3.2.6. Servlet Engine: (Jakarta Tomcat 4.x, Jetty, Caucho Resin or equivalent).</a></span></dt><dt><span class="section"><a href="ch03.html#N107CE">3.2.7. Perl (required for [dspace]/bin/dspace-info.pl)</a></span></dt></dl></dd><dt><span class="section"><a href="ch03.html#N107D4">3.3. Installation Options</a></span></dt><dd><dl><dt><span class="section"><a href="ch03.html#N107DB">3.3.1. Overview of Install Options</a></span></dt><dt><span class="section"><a href="ch03.html#N1085E">3.3.2. Overview of DSpace Directories</a></span></dt><dt><span class="section"><a href="ch03.html#N108B4">3.3.3. Installation</a></span></dt></dl></dd><dt><span class="section"><a href="ch03.html#N10A8F">3.4. Advanced Installation</a></span></dt><dd><dl><dt><span class="section"><a href="ch03.html#N10A98">3.4.1. 'cron' Jobs</a></span></dt><dt><span class="section"><a href="ch03.html#N10AD2">3.4.2. Multilingual Installation</a></span></dt><dt><span class="section"><a href="ch03.html#N10AED">3.4.3. DSpace over HTTPS</a></span></dt><dd><dl><dt><span class="section"><a href="ch03.html#N10B01">3.4.3.1. To enable the HTTPS support in Tomcat 5.0:</a></span></dt><dt><span class="section"><a href="ch03.html#N10BD1">3.4.3.2. To use SSL on Apache HTTPD with mod_jk:</a></span></dt></dl></dd><dt><span class="section"><a href="ch03.html#N10C23">3.4.4. The Handle Server</a></span></dt><dd><dl><dt><span class="section"><a href="ch03.html#N10C92">3.4.4.1. Updating Existing Handle Prefixes</a></span></dt></dl></dd><dt><span class="section"><a href="ch03.html#N10CA1">3.4.5. Google and HTML sitemaps</a></span></dt><dt><span class="section"><a href="ch03.html#N10CF2">3.4.6. DSpace Statistics</a></span></dt></dl></dd><dt><span class="section"><a href="ch03.html#N10D3F">3.5. Windows Installation</a></span></dt><dd><dl><dt><span class="section"><a href="ch03.html#N10D46">3.5.1. Pre-requisite Software</a></span></dt><dt><span class="section"><a href="ch03.html#N10D88">3.5.2. Installation Steps</a></span></dt></dl></dd><dt><span class="section"><a href="ch03.html#N10E3F">3.6. Checking Your Installation</a></span></dt><dt><span class="section"><a href="ch03.html#N10E65">3.7. Known Bugs</a></span></dt><dt><span class="section"><a href="ch03.html#N10E7A">3.8. Common Problems</a></span></dt></dl></div><div class="section" title="3.1.&nbsp;For the Impatient"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="N1068F"></a>3.1.&nbsp;<a name="docbook-install.html-impatient"></a>For the Impatient</h2></div></div><div></div></div><p>Since some users might want to get their test version up and running as fast as possible, offered below is an <span class="italic">unsupported</span> outline of getting DSpace to run quickly.</p><div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="/jspui/doc/image/warning.png"></td><th align="left"></th></tr><tr><td valign="top" align="left"><p>Only experienced unix admins should even attempt the following without going to Section 3.3</p></td></tr></table></div><p>
<pre class="screen">
useradd -m dspace
gunzip -c dspace-1.x-src-release.tar.gz | tar -xf -
createuser -U postgres -d -A -P dspace
createdb -U dspace -E UNICODE dspace
cd [dspace-source]/dspace/config
vi dspace.cfg
mkdir <span class="emphasis"><em>[dspace]</em></span>
chown dspace [dspace]
su - dspace
cd [dspace-source]/dspace
mvn package
cd [dspace-source]/dspace/target/dspace-&lt;version&gt;-build.dir
ant fresh_install
cp -r [dspace]/webapps/* [tomcat]/webapps
/etc/init.d/tomcat start
[dspace]/bin/create-administrator</pre>
</p></div><div class="section" title="3.2.&nbsp;Prerequisite Software"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="N106A8"></a>3.2.&nbsp;<a name="docbook-install.html-prerequisite"></a>Prerequisite Software</h2></div></div><div></div></div><p>The list below describes the third-party components and tools you'll need to run a DSpace server. These are just guidelines. Since DSpace is built on open source, standards-based tools, there are numerous other possibilities and setups.</p><p>Also, please note that the configuration and installation guidelines relating to a particular tool below are here for convenience. You should refer to the documentation for each individual component for complete and up-to-date details. Many of the tools are updated on a frequent basis, and the guidelines below may become out of date.</p><div class="section" title="3.2.1.&nbsp;UNIX-like OS or Microsoft Windows"><div class="titlepage"><div><div><h3 class="title"><a name="N106B3"></a>3.2.1.&nbsp;UNIX-like OS or Microsoft Windows</h3></div></div><div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> UNIX-like OS (Linux, HP/UX etc) : Many distributions of Linux/Unix come with some of the dependencies below pre installed or easily installed via updates, you should consult your particular distributions documentation to determine what is already available.</p></li><li class="listitem"><p> Microsoft Windows: (see full <a class="link" href="ch03.html#docbook-install.html-windows">Windows Instructions</a> for full set of prerequisites)</p></li></ul></div></div><div class="section" title="3.2.2.&nbsp;Sun Java JDK 5 or later (standard SDK is fine, you don't need J2EE)"><div class="titlepage"><div><div><h3 class="title"><a name="N106C2"></a>3.2.2.&nbsp;Sun Java JDK 5 or later (standard SDK is fine, you don't need J2EE)</h3></div></div><div></div></div><p>DSpace now requires <span class="bold"><strong>Sun</strong></span> Java 5 or greater because of usage of new language capabilities introduced in 5 that make coding easier and cleaner.</p><p>Java 5 or later can be downloaded from the following location: <a class="ulink" href="http://java.sun.com/javase/downloads/index.jsp" target="_top">http://java.sun.com/javase/downloads/index.jsp</a></p><p>
<div class="tip" title="Tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="/jspui/doc/image/tip.png"></td><th align="left"></th></tr><tr><td valign="top" align="left"><p>Only Sun's Java has been tested with each release and is known to work correctly. Other flavors of Java may pose problems.</p></td></tr></table></div>
</p></div><div class="section" title="3.2.3.&nbsp;Apache Maven 2.0.8 or later (Java build tool)"><div class="titlepage"><div><div><h3 class="title"><a name="N106D7"></a>3.2.3.&nbsp;Apache Maven 2.0.8 or later (Java build tool)</h3></div></div><div></div></div><p>Maven is necessary in the first stage of the build process to assemble the installation package for your DSpace instance. It gives you the flexibility to customize DSpace using the exisitng Maven projects found in the <code class="literal">[dspace-source]/dspace/modules</code> directory or by adding in your own Maven project to build the installation package for DSpace, and apply any custom interface "overlay" changes.</p><p>Maven can be downloaded from the following location: <a class="ulink" href="http://maven.apache.org/download.html" target="_top">http://maven.apache.org/download.html</a></p><div class="section" title="3.2.3.1.&nbsp;Configuring a Proxy"><div class="titlepage"><div><div><h4 class="title"><a name="N106E6"></a>3.2.3.1.&nbsp;Configuring a Proxy</h4></div></div><div></div></div><p>You can configure a proxy to use for some or all of your HTTP requests in Maven 2.0. The username and password are only required if your proxy requires basic authentication (note that later releases may support storing your passwords in a secured keystore&mdash;in the mean time, please ensure your <code class="literal">settings.xml</code> file (usually <code class="literal">${user.home}/.m2/settings.xml</code>) is secured with permissions appropriate for your operating system).</p><p>Example:</p><pre class="screen">&lt;settings&gt;
.
.
&lt;proxies&gt;
&lt;proxy&gt;
&lt;active&gt;true&lt;/active&gt;
&lt;protocol&gt;http&lt;/protocol&gt;
&lt;host&gt;proxy.somewhere.com&lt;/host&gt;
&lt;port&gt;8080&lt;/port&gt;
&lt;username&gt;proxyuser&lt;/username&gt;
&lt;password&gt;somepassword&lt;/password&gt;
&lt;nonProxyHosts&gt;www.google.com|*.somewhere.com&lt;/nonProxyHosts&gt;
&lt;/proxy&gt;
&lt;/proxies&gt;
.
.
&lt;/settings&gt; </pre></div></div><div class="section" title="3.2.4.&nbsp;Apache Ant 1.7 or later (Java build tool)"><div class="titlepage"><div><div><h3 class="title"><a name="N106F9"></a>3.2.4.&nbsp;Apache Ant 1.7 or later (Java build tool)</h3></div></div><div></div></div><p>Apache Ant is still required for the second stage of the build process. It is used once the installation package has been constructed in <code class="literal">[dspace-source]/dspace/target/dspace-&lt;version&gt;-build.dir</code> and still uses some of the familiar ant build targets found in the 1.4.x build process.</p><p>Ant can be downloaded from the following location: <a class="ulink" href="http://ant.apache.org/" target="_top">http://ant.apache.org</a></p></div><div class="section" title="3.2.5.&nbsp;Relational Database: (PostgreSQL or Oracle)."><div class="titlepage"><div><div><h3 class="title"><a name="N10708"></a>3.2.5.&nbsp;<a name="docbook-install.xml-postgresql"></a>Relational Database: (PostgreSQL or Oracle).</h3></div></div><div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<span class="bold"><strong>PostgreSQL 7.3 or 7.4</strong></span>
</p><p>PostgreSQL can be downloaded from the following location: <a class="ulink" href="http://www.postgresql.org/" target="_top">http://www.postgresql.org/ </a> Its highly recommended that you try to work with Postgres 8.x or greater, however, 7.3 or greater should still work. Unicode (specifically UTF-8) support must be enabled. This is enabled by default in 8.0+. For 7.<span class="emphasis"><em>x</em></span>, be sure to compile with the following options to the '<code class="literal">configure</code>' script:</p><p><code class="literal">--enable-multibyte --enable-unicode --with-java</code></p><p>Once installed, you need to enable TCP/IP connections (DSpace uses JDBC). For 7.<span class="emphasis"><em>x</em></span>, edit <code class="literal">postgresql.conf</code> (usually in <code class="literal">/usr/local/pgsql/data</code> or <code class="literal">/var/lib/pgsql/data</code>), and add this line:</p><p><code class="literal">tcpip_socket = true</code></p><p>Then tighten up security a bit by editing <code class="literal">pg_hba.conf</code> and adding this line:</p><p><code class="literal">host dspace dspace 127.0.0.1 255.255.255.255 md5</code></p><p>Then restart PostgreSQL.</p></li><li class="listitem"><p><span class="bold"><strong>For 8.0 or later</strong></span></p><p>Editing <code class="literal">postgresql.conf</code> uncomment the line starting:</p><p><code class="literal">listen_addresses = 'localhost'</code></p><p>Then tighten up security a bit by editing <code class="literal">pg_hba.conf</code> and adding this line:</p><p><code class="literal">host dspace dspace 127.0.0.1 255.255.255.255 md5</code></p><p>Then restart PostgreSQL.</p></li><li class="listitem"><p><span class="bold"><strong>Oracle 9 or greater</strong></span></p><p>Details on acquiring Oracle can be downloaded from the following location: <a class="ulink" href="http://www.oracle.com/database/" target="_top">http://www.oracle.com/database/</a></p><p> You will need to create a database for DSpace. Make sure that the character set is one of the Unicode character sets. DSpace uses UTF-8 natively, and it is suggested that the Oracle database use the same character set. You will also need to create a user account for DSpace (e.g. <code class="literal">dspace</code>,) and ensure that it has permissions to add and remove tables in the database. Refer to the Quick Installation for more details.</p><p><span class="bold"><strong>NOTE:</strong></span> DSpace uses sequences to generate unique object IDs - beware Oracle sequences, which are said to lose their values when doing a database export/import, say restoring from a backup. Be sure to run the script <code class="literal">etc/update-sequences.sql</code>.</p><p>For people interested in switching from Postgres to Oracle, I know of no tools that would do this automatically. You will need to recreate the community, collection, and eperson structure in the Oracle system, and then use the item export and import tools to move your content over.</p></li></ul></div></div><div class="section" title="3.2.6.&nbsp;Servlet Engine: (Jakarta Tomcat 4.x, Jetty, Caucho Resin or equivalent)."><div class="titlepage"><div><div><h3 class="title"><a name="N1077F"></a>3.2.6.&nbsp;Servlet Engine: (Jakarta Tomcat 4.x, Jetty, Caucho Resin or equivalent).</h3></div></div><div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="bold"><strong>Jakarta Tomcat 4.x or later.</strong></span></p><p>Tomcat can be downloaded from the following location: <a class="ulink" href="http://tomcat.apache.org/whichversion.html" target="_top">http://tomcat.apache.org</a></p><p>Note that DSpace will need to run as the same user as Tomcat, so you might want to install and run Tomcat as a user called '<code class="literal">dspace</code>'. Set the environment variable TOMCAT_USER appropriately.</p><p>You need to ensure that Tomcat has a) enough memory to run DSpace and b) uses UTF-8 as its default file encoding for international character support. So ensure in your startup scripts (etc) that the following environment variable is set: </p><p><code class="literal">JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"</code></p><p><span class="bold"><strong>Modifications in <code class="literal">/[tomcat]/conf/server.xml</code></strong></span> :</p><p>You also need to alter Tomcat's default configuration to support searching and browsing of multi-byte UTF-8 correctly. You need to add a configuration option to the <code class="literal">&lt;Connector&gt;</code> element in <code class="literal">[tomcat]/config/server.xml</code>: </p><p><code class="literal">URIEncoding="UTF-8"</code></p><p> e.g. if you're using the default Tomcat config, it should read: </p><pre class="screen">
&lt;!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --&gt;
&lt;Connector port="8080"
maxThreads="150"
minSpareThreads="25"
maxSpareThreads="75"
enableLookups="false"
redirectPort="8443"
acceptCount="100"
connectionTimeout="20000"
disableUploadTimeout="true"
<span class="bold"><strong>URIEncoding="UTF-8"</strong></span>/&gt;</pre><p>You may change the port from 8080 by editing it in the file above, and by setting the variable CONNECTOR_PORT in server.xml</p></li><li class="listitem"><p>
<span class="bold"><strong>Jetty or Caucho Resin</strong></span>
</p><p>DSpace will also run on an equivalent servlet Engine, such as Jetty (<a class="ulink" href="http://www.mortbay.org/jetty/index.html" target="_top">http://www.mortbay.org/jetty/index.html</a>) or Caucho Resin (<a class="ulink" href="http://www.caucho.com/" target="_top">http://www.caucho.com/)</a>.</p><p>Jetty and Resin are configured for correct handling of UTF-8 by default.</p></li></ul></div></div><div class="section" title="3.2.7.&nbsp;Perl (required for [dspace]/bin/dspace-info.pl)"><div class="titlepage"><div><div><h3 class="title"><a name="N107CE"></a>3.2.7.&nbsp;Perl (required for [dspace]/bin/dspace-info.pl)</h3></div></div><div></div></div><p> </p></div></div><div class="section" title="3.3.&nbsp;Installation Options"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="N107D4"></a>3.3.&nbsp;<a name="docbook-install.html-installoptions"></a>Installation Options</h2></div></div><div></div></div><div class="section" title="3.3.1.&nbsp;Overview of Install Options"><div class="titlepage"><div><div><h3 class="title"><a name="N107DB"></a>3.3.1.&nbsp;<a name="docbook-install.html-options"></a>Overview of Install Options</h3></div></div><div></div></div><p>With the advent of a new Apache <a class="ulink" href="http://maven.apache.org/" target="_top">Maven 2</a> based build architecture in DSpace 1.5.x, you now have two options in how you may wish to install and manage your local installation of DSpace. If you've used DSpace 1.4.x, please recognize that the initial build procedure has changed to allow for more customization. You will find the later 'Ant based' stages of the installation procedure familiar. Maven is used to resolve the dependencies of DSpace online from the 'Maven Central Repository' server.</p><p>It is important to note that the strategies are identical in terms of the list of procedures required to complete the build process, the only difference being that the Source Release includes "more modules" that will be built given their presence in the distribution package.</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><a name="docbook-install.html-defaultRelease"></a>Default Release (dspace-&lt;version&gt;-release.zip)<div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p>This distribution will be adequate for most cases of running a DSpace instance. It is intended to be the quickest way to get DSpace installed and running while still allowing for customization of the themes and branding of your DSpace instance. </p></li><li class="listitem"><p>This method allows you to customize DSpace configurations (in dspace.cfg) or user interfaces, using basic pre-built interface "overlays".</p></li><li class="listitem"><p>It downloads "precompiled" libraries for the core dspace-api, supporting servlets, taglibraries, aspects and themes for the dspace-xmlui, dspace-xmlui and other webservice/applications.</p></li><li class="listitem"><p>This approach exposes the parts of the application that the DSpace committers would prefer to see customized. All other modules are downloaded from the 'Maven Central Repository'</p><p>The directory structure for this release is the following:<div class="itemizedlist"><ul class="itemizedlist" type="square"><li class="listitem"><p><code class="literal">[dspace-source]</code><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="literal">dspace/</code> - DSpace 'build' and configuration module</p></li><li class="listitem"><p><code class="literal">pom.xml</code> - DSpace Parent Project definition</p></li></ul></div></p></li></ul></div></p></li></ul></div></p></li><li class="listitem"><p>Source Release (dspace-&lt;version&gt;-src-release.zip)<div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p>This method is recommended for those who wish to develop DSpace further or alter its underlying capabilities to a greater degree.</p></li><li class="listitem"><p>It contains <span class="bold"><strong>all</strong></span> dspace code for the core dspace-api, supporting servlets, taglibraries, aspects and themes for Manakin (dspace-xmlui), and other webservice/applications.</p></li><li class="listitem"><p>Provides all the same capabilities as the normal release.</p><p>The directory structure for this release is more detailed: <div class="itemizedlist"><ul class="itemizedlist" type="square"><li class="listitem"><p><code class="literal">[dspace-source]</code>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="literal">dspace/</code> - DSpace 'build' and configuration module</p></li><li class="listitem"><p><code class="literal">dspace-api/</code> - Java API source module</p></li><li class="listitem"><p><code class="literal">dspace-jspui/</code> - JSP-UI source module</p></li><li class="listitem"><p><code class="literal">dspace-oai</code> - OAI-PMH source module</p></li><li class="listitem"><p><code class="literal">dspace-xmlui</code> - XML-UI (Manakin) source module</p></li><li class="listitem"><p><code class="literal">dspace-lni</code> - Lightweight Network Interface source module</p></li><li class="listitem"><p><code class="literal">dspace-sword</code> -- SWORD (Simple Web-serve Offering Repository Deposit) deposit service source module</p></li><li class="listitem"><p><code class="literal">pom.xml</code> - DSpace Parent Project definition</p></li></ul></div></p></li></ul></div></p></li></ul></div></p></li></ul></div></div><div class="section" title="3.3.2.&nbsp;Overview of DSpace Directories"><div class="titlepage"><div><div><h3 class="title"><a name="N1085E"></a>3.3.2.&nbsp;<a name="docbook-install.html-directories"></a>Overview of DSpace Directories</h3></div></div><div></div></div><p>Before beginning an installation, it is important to get a general understanding of the DSpace directories and the names by which they are generally referred. (Please attempt to use these below directory names when asking for help on the DSpace Mailing Lists, as it will help everyone better understand what directory you may be referring to.)</p><p>DSpace uses three separate directory trees. Although you don't need to know all the details of them in order to install DSpace, you do need to know they exist and also know how they're referred to in this document:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><span class="bold"><strong>The installation directory</strong></span>, referred to as <span class="emphasis"><em><code class="literal">[dspace]</code></em></span> . This is the location where DSpace is installed and running off of it is the location that gets defined in the dspace.cfg as "dspace.dir". It is where all the DSpace configuration files, command line scripts, documentation and webapps will be installed to.</p></li><li class="listitem"><p><span class="bold"><strong>The source directory</strong></span>, referred to as <span class="emphasis"><em><code class="literal">[dspace-source]</code></em></span> . This is the location where the DSpace release distribution has been unzipped into. It usually has the name of the archive that you expanded such as <span class="emphasis"><em>dspace-&lt;version&gt;-release</em></span> or <span class="emphasis"><em>dspace-&lt;version&gt;-src-release</em></span>. It is the directory where all of your "build" commands will be run.</p></li><li class="listitem"><p><span class="bold"><strong>The web deployment directory</strong></span>. This is the directory that contains your DSpace web application(s). In DSpace 1.5.x and above, this corresponds to <span class="emphasis"><em><code class="literal">[dspace]/webapps</code></em></span> by default. However, if you are using Tomcat, you may decide to copy your DSpace web applications from <span class="emphasis"><em><code class="literal">[dspace]/webapps/</code></em></span> to <code class="literal">[tomcat]/webapps/</code> (with <code class="literal">[tomcat]</code> being wherever you installed Tomcat&mdash;also known as <code class="literal">$CATALINA_HOME</code>).</p></li></ol></div><p>For details on the contents of these separate directory trees, refer to <a class="link" href="ch10.html#docbook-directories.html">directories.html</a>. <span class="emphasis"><em>Note that the <code class="literal">[dspace-source]</code> and <code class="literal">[dspace]</code> directories are always separate!</em></span></p></div><div class="section" title="3.3.3.&nbsp;Installation"><div class="titlepage"><div><div><h3 class="title"><a name="N108B4"></a>3.3.3.&nbsp;<a name="docbook-install.html-installsteps"></a>Installation</h3></div></div><div></div></div><p> This method gets you up and running with DSpace quickly and easily. It is identical in both the <a class="link" href="ch03.html#docbook-install.html-defaultRelease">Default Release</a> and <a class="link" href="">Source Release</a> distributions. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><span class="bold"><strong>Create the DSpace user</strong></span>. This needs to be the same user that Tomcat (or Jetty etc.) will run as. e.g. as <span class="bold"><strong><span class="underline">root</span></strong></span> run:</p><pre class="screen">useradd -m dspace</pre></li><li class="listitem"><p><span class="bold"><strong>Download</strong></span> the <a class="ulink" href="http://sourceforge.net/projects/dspace/" target="_top">latest DSpace release</a> There are two version available with each release of DSpace: (<code class="literal">dspace-1.x-release.</code> and <code class="literal">dspace-1.x-src-release.xxx</code>); you only need to choose one. If you want a copy of all underlying Java source code, you should download the <code class="literal">dspace-1.x-src-release.xxx</code> Within each version, you have a choice of compressed file format. Choose the one that best fits your environment.</p></li><li class="listitem"><p><span class="bold"><strong>Unpack the DSpace software</strong></span>. After downloading the software, based on the compression file format, choose one of the following methods to unpack your software: <div class="orderedlist"><ol class="orderedlist" type="a"><li class="listitem"><p><span class="bold"><strong>Zip file</strong></span>. If you downloaded <code class="literal">dspace-1.6-release.zip</code> do the following:</p><pre class="screen">unzip dspace-1.6-release.zip</pre></li><li class="listitem"><p><span class="bold"><strong>.gz file</strong></span>. If you downloaded <code class="literal">dspace-1.6-release.tar.gz</code> do the following:</p><pre class="screen">gunzip -c dspace-1.6-release.tar.gz | tar -xf -</pre></li><li class="listitem"><p><span class="bold"><strong>.bz2 file</strong></span>. If you downloaded <code class="literal">dspace-1.6-release.tar.bz2</code>do the following:</p><pre class="screen">bunzip2 dspace-1.6-release.tar.bz | tar -xf -</pre></li></ol></div></p><p>For ease of reference, we will refer to the location of this unzipped version of the DSpace release as <code class="literal">[dspace-source]</code> in the remainder of these instructions.</p><div class="tip" title="Tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="/jspui/doc/image/tip.png"></td><th align="left"></th></tr><tr><td valign="top" align="left"><p>After unpacking the file, the user may which to change the ownership of the <code class="literal">dspace-1.6-release</code> to the 'dspace' user. (And you may need to change the group).</p></td></tr></table></div></li><li class="listitem"><p><span class="bold"><strong>Database Setup</strong></span></p><p>
<span class="underline">PostgreSQL:</span>
</p><div class="orderedlist"><ol class="orderedlist" type="a"><li class="listitem"><p>
<a name="docbook-install.html-pgdriver"></a>A PostgreSQL 8.1-404 jdbc3 driver is configured as part of the default DSpace build. You no longer need to copy any PostgreSQL jars to get PostgreSQL installed.</p></li><li class="listitem"><p>Create a <code class="literal">dspace</code> database, owned by the <code class="literal">dspace</code> PostgreSQL user <span class="emphasis"><em>(you are still logged in at 'root')</em></span>:</p><pre class="screen">createuser -U postgres -d -A -P dspace ; createdb -U dspace -E UNICODE dspace</pre><p>You will be prompted for a password for the DSpace database. (This isn't the same as the <code class="literal">dspace</code> user's UNIX password.)</p></li></ol></div><p>
<span class="underline">Oracle:</span>
</p><div class="orderedlist"><ol class="orderedlist" type="a"><li class="listitem"><p> Setting up oracle is a bit different now. You will need still need to get a Copy of the oracle JDBC driver, but instead of copying it into a lib directory you will need to install it into your local Maven repository. You'll need to download it first from this location: <a class="ulink" href="http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html" target="_top">http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html</a></p><p>
<code class="literal">$ mvn install:install-file -Dfile=ojdbc14.jar -DgroupId=com.oracle \ -DartifactId=ojdbc14 -Dversion=10.2.0.2.0 -Dpackaging=jar -DgeneratePom=true</code>
</p></li><li class="listitem"><p>Create a database for DSpace. Make sure that the character set is one of the Unicode character sets. DSpace uses UTF-8 natively, and it is suggested that the Oracle database use the same character set. Create a user account for DSpace (e.g. <code class="literal">dspace</code>,) and ensure that it has permissions to add and remove tables in the database.</p></li><li class="listitem"><p>Edit the <code class="literal">[dspace-source]/dspace/config/dspace.cfg</code> database settings:</p><pre class="screen">
db.name = oracle
db.url = jdbc:oracle:thin:@//host:port/dspace
db.driver = oracle.jdbc.OracleDriver
</pre></li></ol></div></li><li class="listitem"><p><span class="bold"><strong>Initial Configuration</strong></span></p><p>Edit<code class="literal">[dspace-source]/dspace/config/dspace.cfg</code>, in particular you'll need to set these properties:</p><p><code class="literal">dspace.dir</code> -- must be set to the <code class="literal">[dspace]</code> (installation) directory.</p><p><code class="literal">dspace.url</code> -- complete URL of this server's DSpace home page.</p><p><code class="literal">dspace.hostname</code> -- fully-qualified domain name of web server.</p><p><code class="literal">dspace.name</code> -- "Proper" name of your server, e.g. "My Digital Library".</p><p><code class="literal">db.password</code> -- the database password you entered in the previous step.</p><p><code class="literal">mail.server</code> -- fully-qualified domain name of your outgoing mail server.</p><p><code class="literal">mail.from.address</code> -- the "From:" address to put on email sent by DSpace.</p><p><code class="literal">feedback.recipient</code> -- mailbox for feedback mail.</p><p><code class="literal">mail.admin</code> -- mailbox for DSpace site administrator.</p><p><code class="literal">alert.recipient</code> -- mailbox for server errors/alerts (not essential but very useful!)</p><p><code class="literal">registration.notify</code> -- mailbox for emails when new users register (optional) </p><p><span class="bold"><strong>NOTE:</strong></span> You can interpolate the value of one configuration variable in the value of another one. For example, to set <code class="literal">feedback.recipient</code> to the same value as <code class="literal">mail.admin</code>, the line would look like:</p><pre class="screen"> feedback.recipient = ${mail.admin}</pre><p>Refer to <a class="link" href="ch05.html#docbook-configure.html"><span class="underline">5.2. General Configuration</span></a> for details and examples of the above.</p></li><li class="listitem"><p><span class="bold"><strong>DSpace Directory</strong></span></p><p>Create the directory for the DSpace installation (i.e. <code class="literal">[dspace]</code>). As <span class="emphasis"><em>root</em></span> (or a user with appropriate permissions), run: </p><pre class="screen">mkdir <span class="emphasis"><em>[dspace]</em></span>
chown dspace <span class="emphasis"><em>[dspace]</em></span></pre><p>(Assuming the <code class="literal">dspace</code> UNIX username.)</p></li><li class="listitem"><p><span class="bold"><strong>Installation Package</strong></span></p><p>As the <code class="literal">dspace</code> UNIX user, generate the DSpace installation package in the <code class="literal">[dspace-source]/dspace</code> directory:</p><pre class="screen">cd <span class="emphasis"><em>[dspace-source]</em></span>/dspace/
mvn package</pre><p>Note: without any extra arguments, the DSpace installation package is initialized for PostgreSQL.</p><p><span class="emphasis"><em>If you want to use Oracle instead, you should build the DSpace installation package as follows:</em></span></p><pre class="screen">mvn -Ddb.name=oracle package</pre></li><li class="listitem"><p><span class="bold"><strong>Build DSpace and Initialize Database</strong></span></p><p>As the <code class="literal">dspace</code> UNIX user, initialize the DSpace database and install DSpace to <code class="literal">[dspace]</code>:</p><pre class="screen">cd <span class="emphasis"><em>[dspace-source]</em></span>/dspace/target/dspace-[version]-build.dir
ant fresh_install</pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="/jspui/doc/image/note.png"></td><th align="left"></th></tr><tr><td valign="top" align="left"><p>To see a complete list of build targets, run:</p><p><code class="literal">ant help</code></p></td></tr></table></div><p>The most likely thing to go wrong here is the database connection. See the <a class="link" href="ch03.html#docbook-install.html-problems"><span class="underline">3.7 Common Problems Section</span></a>.</p></li><li class="listitem"><p><span class="bold"><strong>Deploy Web Applications</strong></span></p><p>You have two choices or techniques for having Tomcat/Jetty/Resin serve up your web applications.</p><p><span class="bold"><strong>Technique A.</strong></span> Simple and complete. You copy only (or all) of the DSpace Web application(s) you wish to use from the <code class="literal">[dspace]/webapps</code> directory to the appropriate directory in your Tomcat/Jetty/Resin installation. For example:</p><p><code class="literal">cp -R [dspace]/webapps/* [tomcat]/webapps</code> (This will copy all the web applications to Tomcat.)</p><p><code class="literal">cp -R [dspace]/webapps/jspui [tomcat]/webapps</code> (This will copy only the jspui web application to Tomcat.)</p><p>__</p><p><span class="bold"><strong>Technique B.</strong></span>Tell your Tomcat/Jetty/Resin installation where to find your DSpace web application(s). As an example, in the &lt;Host&gt; section of your <code class="literal">[tomcat]/conf/server.xml</code> you could add lines similar to the following (but replace <code class="literal">[dspace]</code> with your installation location:</p><pre class="screen">&lt;!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
--&gt;
&lt;Host name="localhost" appBase="[dspace]/webapps"
....</pre></li><li class="listitem"><p>
<span class="bold"><strong>Administrator Account</strong></span></p><p>Create an initial administrator account:</p><pre class="screen"><span class="emphasis"><em>[dspace]</em></span>/bin/create-administrator</pre></li><li class="listitem"><p>
<span class="bold"><strong>Initial Startup!</strong></span></p><p>Now the moment of truth! Start up (or restart) Tomcat/Jetty/Resin. Visit the base URL(s) of your server, depending on which DSpace web applications you want to use. You should see the DSpace home page. Congratulations! </p><p>Base URLs of DSpace Web Applications:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>JSP User Interface</em></span> - (e.g.) http://dspace.myu.edu:8080/jspui</p></li><li class="listitem"><p><span class="emphasis"><em>XML User Interface (aka. Manakin)</em></span> - (e.g.) http://dspace.myu.edu:8080/xmlui</p></li><li class="listitem"><p><span class="emphasis"><em>OAI-PMH Interface</em></span> - (e.g.) http://dspace.myu.edu:8080/oai/request?verb=Identify (Should return an XML-based response)</p></li></ul></div></li></ol></div><p>In order to set up some communities and collections, you'll need to login as your DSpace Administrator (which you created with <code class="literal">create-administrator</code> above) and access the administration UI in either the JSP or XML user interface.</p></div></div><div class="section" title="3.4.&nbsp;Advanced Installation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="N10A8F"></a>3.4.&nbsp;<a name="docbook-install.html-advancedinstall"></a>Advanced Installation</h2></div></div><div></div></div><p>The above installation steps are sufficient to set up a test server to play around with, but there are a few other steps and options you should probably consider before deploying a DSpace production site.</p><div class="section" title="3.4.1.&nbsp;'cron' Jobs"><div class="titlepage"><div><div><h3 class="title"><a name="N10A98"></a>3.4.1.&nbsp;'cron' Jobs</h3></div></div><div></div></div><p>A couple of DSpace features require that a script is run regularly -- the e-mail subscription feature that alerts users of new items being deposited, and the new 'media filter' tool, that generates thumbnails of images and extracts the full-text of documents for indexing.</p><p>To set these up, you just need to run the following command as the <code class="literal">dspace</code> UNIX user:</p><pre class="screen">crontab -e</pre><p>Then add the following lines:</p><pre class="screen"># Send out subscription e-mails at 01:00 every day
0 1 * * * <span class="emphasis"><em> [dspace]</em></span>/bin/sub-daily
# Run the media filter at 02:00 every day
0 2 * * * <span class="emphasis"><em> [dspace]</em></span>/bin/filter-media
# Run the checksum checker at 03:00
0 3 * * * <span class="emphasis"><em> [dspace]</em></span>/bin/checker -lp
# Mail the results to the sysadmin at 04:00
0 4 * * * <span class="emphasis"><em> [dspace]</em></span>/bin/dsrun org.dspace.checker.DailyReportEmailer -c
</pre><p>Naturally you should change the frequencies to suit your environment.</p><p>PostgreSQL also benefits from regular 'vacuuming', which optimizes the indexes and clears out any deleted data. Become the <code class="literal">postgres</code> UNIX user, run <code class="literal">crontab -e</code> and add (for example):</p><pre class="screen"># Clean up the database nightly at 4.20am
20 4 * * * vacuumdb --analyze dspace &gt; /dev/null 2&gt;&amp;1</pre><p>In order that statistical reports are generated regularly and thus kept up to date you should set up the following cron jobs:</p><pre class="screen"># Run stat analysis
0 1 * * * [dspace]/bin/stat-general
0 1 * * * [dspace]/bin/stat-monthly
0 2 * * * [dspace]/bin/stat-report-general
0 2 * * * [dspace]/bin/stat-report-monthly</pre><p>Obviously, you should choose execution times which are most useful to you, and you should ensure that the <code class="literal">-report-</code> scripts run a short while after the analysis scripts to give them time to complete (a run of around 8 months worth of logs can take around 25 seconds to complete); the resulting reports will let you know how long analysis took and you can adjust your cron times accordingly.</p></div><div class="section" title="3.4.2.&nbsp;Multilingual Installation"><div class="titlepage"><div><div><h3 class="title"><a name="N10AD2"></a>3.4.2.&nbsp;Multilingual Installation</h3></div></div><div></div></div><p>In order to deploy a multilingual version of DSpace you have to configure two parameters in <code class="literal">[dspace-source]/config/dspace.cfg:</code></p><p><code class="literal">default.locale</code>, e. g. default.locale = en</p><p><code class="literal">webui.supported locales</code>, e. g. webui.supported.locales = en, de</p><p>The Locales might have the form country, country_language, country_language_variant.</p><p>According to the languages you wish to support, you have to make sure, that all the i18n related files are available see the <a class="link" href="">Multilingual User Interface Configuring MultiLingual Support</a> section for the JSPUI or the Multilingual Support for XMLUI in the configuration documentation. </p></div><div class="section" title="3.4.3.&nbsp;DSpace over HTTPS"><div class="titlepage"><div><div><h3 class="title"><a name="N10AED"></a>3.4.3.&nbsp;<a name="docbook-install.html-https"></a>DSpace over HTTPS</h3></div></div><div></div></div><p>If your DSpace is configured to have users login with a username and password (as opposed to, say, client Web certificates), then you should consider using HTTPS. Whenever a user logs in with the Web form (e.g. <code class="literal">dspace.myuni.edu/dspace/password-login</code>) their DSpace password is exposed in plain text on the network. This is a very serious security risk since network traffic monitoring is very common, especially at universities. If the risk seems minor, then consider that your DSpace administrators also login this way and they have ultimate control over the archive.</p><p>The solution is to use <span class="emphasis"><em>HTTPS</em></span> (HTTP over SSL, i.e. Secure Socket Layer, an encrypted transport), which protects your passwords against being captured. You can configure DSpace to require SSL on all "authenticated" transactions so it only accepts passwords on SSL connections.</p><p>The following sections show how to set up the most commonly-used Java Servlet containers to support HTTP over SSL.</p><div class="section" title="3.4.3.1.&nbsp;To enable the HTTPS support in Tomcat 5.0:"><div class="titlepage"><div><div><h4 class="title"><a name="N10B01"></a>3.4.3.1.&nbsp;To enable the HTTPS support in Tomcat 5.0:</h4></div></div><div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><span class="bold"><strong>For Production use:</strong></span> Follow this procedure to set up SSL on your server. Using a "real" server certificate ensures your users' browsers will accept it without complaints. </p><p>In the examples below, <code class="literal">$CATALINA_BASE</code> is the directory under which your Tomcat is installed.</p><div class="orderedlist"><ol class="orderedlist" type="a"><li class="listitem"><p> Create a Java keystore for your server with the password <code class="literal">changeit</code>, and install your server certificate under the alias <code class="literal">"tomcat"</code>. This assumes the certificate was put in the file <code class="literal">server.pem</code>:</p><pre class="screen">$JAVA_HOME/bin/keytool -import -noprompt -v -storepass changeit
-keystore $CATALINA_BASE/conf/keystore -alias tomcat -file
myserver.pem</pre></li><li class="listitem"><p> Install the CA (Certifying Authority) certificate for the CA that granted your server cert, if necessary. This assumes the server CA certificate is in <code class="literal">ca.pem</code>:</p><pre class="screen"> $JAVA_HOME/bin/keytool -import -noprompt -storepass changeit
-trustcacerts -keystore $CATALINA_BASE/conf/keystore -alias ServerCA
-file ca.pem
</pre></li><li class="listitem"><p>Optional -- ONLY if you need to accept client certificates for the X.509 certificate stackable authentication module See the <a class="link" href="">configuration section</a> for instructions on enabling the X.509 authentication method. Load the keystore with the CA (certifying authority) certificates for the authorities of any clients whose certificates you wish to accept. For example, assuming the client CA certificate is in <code class="literal">client1.pem</code>:</p><pre class="screen">$JAVA_HOME/bin/keytool -import -noprompt -storepass changeit
-trustcacerts -keystore $CATALINA_BASE/conf/keystore -alias client1
-file client1.pem
</pre></li><li class="listitem"><p>Now add another Connector tag to your <code class="literal">server.xml</code> Tomcat configuration file, like the example below. The parts affecting or specific to SSL are shown in bold. (You may wish to change some details such as the port, pathnames, and keystore password)</p><pre class="screen"> &lt;Connector port="8443"
maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
enableLookups="false"
disableUploadTimeout="true"
acceptCount="100" debug="0"
<span class="bold"><strong>scheme="https" secure="true" sslProtocol="TLS"
keystoreFile="conf/keystore" keystorePass="changeit" clientAuth="true"</strong></span>
<span class="emphasis"><em> - ONLY if using client X.509 certs for authentication!</em></span> <span class="bold"><strong>
truststoreFile="conf/keystore" trustedstorePass="changeit"</strong></span> /&gt;
</pre><p>Also, check that the default Connector is set up to redirect "secure" requests to the same port as your SSL connector, e.g.: </p><pre class="screen">&lt;Connector port="8080"
maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
enableLookups="false" <span class="bold"><strong>
redirectPort="8443"</strong></span>
acceptCount="100" debug="0" /&gt;
</pre></li></ol></div></li><li class="listitem"><p>
<span class="bold"><strong>Quick-and-dirty Procedure for Testing:</strong></span>
</p><p> If you are just setting up a DSpace server for testing, or to experiment with HTTPS, then you don't need to get a real server certificate. You can create a "self-signed" certificate for testing; web browsers will issue warnings before accepting it but they will function exactly the same after that as with a "real" certificate. </p><p>In the examples below, <code class="literal">$CATALINA_BASE</code> is the directory under which your Tomcat is installed.</p><div class="orderedlist"><ol class="orderedlist" type="a"><li class="listitem"><p> Optional -- ONLY if you don't already have a server certificate. Follow this sub-procedure to request a new, signed server certificate from your Certifying Authority (CA):</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> Create a new key pair under the alias name <code class="literal">"tomcat"</code>. When generating your key, give the Distinguished Name fields the appropriate values for your server and institution. CN should be the fully-qualified domain name of your server host. Here is an example:</p><pre class="screen">
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keysize
1024 \
-keystore $CATALINA_BASE/conf/keystore -storepass changeit
-validity 365 \
-dname 'CN=dspace.myuni.edu, OU=MIT Libraries, O=Massachusetts
Institute of Technology, L=Cambridge, S=MA, C=US'
</pre></li><li class="listitem"><p> Then, create a <span class="emphasis"><em>CSR</em></span> (Certificate Signing Request) and send it to your Certifying Authority. They will send you back a signed Server Certificate. This example command creates a CSR in the file <code class="literal">tomcat.csr</code></p><pre class="screen">
$JAVA_HOME/bin/keytool -keystore $CATALINA_BASE/conf/keystore
-storepass changeit \
-certreq -alias tomcat -v -file tomcat.csr
</pre></li><li class="listitem"><p> Before importing the signed certificate, you must have the CA's certificate in your keystore as a <span class="emphasis"><em>trusted certificate</em></span>. Get their certificate, and import it with a command like this (for the example <code class="literal">mitCA.pem</code>):</p><pre class="screen">
$JAVA_HOME/bin/keytool -keystore $CATALINA_BASE/conf/keystore
-storepass changeit \
-import -alias mitCA -trustcacerts -file mitCA.pem
</pre></li><li class="listitem"><p> Finally, when you get the signed certificate from your CA, import it into the keystore with a command like the following example: (cert is in the file <code class="literal">signed-cert.pem</code>)</p><pre class="screen">
$JAVA_HOME/bin/keytool -keystore $CATALINA_BASE/conf/keystore
-storepass changeit \
-import -alias tomcat -trustcacerts -file signed-cert.pem
</pre><p> Since you now have a signed server certificate in your keystore, you can, obviously, skip the next steps of installing a signed server certificate and the server CA's certificate.</p></li></ul></div></li><li class="listitem"><p> Create a Java keystore for your server with the password <code class="literal">changeit</code>, and install your server certificate under the alias <code class="literal">"tomcat"</code>. This assumes the certificate was put in the file <code class="literal">server.pem</code>:</p><pre class="screen">
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore
$CATALINA_BASE/conf/keystore -storepass changeit
</pre><p>When answering the questions to identify the certificate, be sure to respond to "First and last name" with the fully-qualified domain name of your server (e.g. <code class="literal">test-dspace.myuni.edu</code>). The other questions are not important.</p></li><li class="listitem"><p> Optional -- ONLY if you need to accept client certificates for the X.509 certificate stackable authentication module See the <a class="link" href="">configuration section</a> for instructions on enabling the X.509 authentication method. Load the keystore with the CA (certifying authority) certificates for the authorities of any clients whose certificates you wish to accept. For example, assuming the client CA certificate is in <code class="literal">client1.pem</code>:</p><pre class="screen">
$JAVA_HOME/bin/keytool -import -noprompt -storepass changeit
-trustcacerts -keystore $CATALINA_BASE/conf/keystore -alias client1
-file client1.pem
</pre></li><li class="listitem"><p> Follow the procedure in the section above to add another Connector tag, for the HTTPS port, to your <code class="literal">server.xml</code> file.</p></li></ol></div></li></ol></div></div><div class="section" title="3.4.3.2.&nbsp;To use SSL on Apache HTTPD with mod_jk:"><div class="titlepage"><div><div><h4 class="title"><a name="N10BD1"></a>3.4.3.2.&nbsp;To use SSL on Apache HTTPD with mod_jk:</h4></div></div><div></div></div><p> If you choose <a class="ulink" href="http://httpd.apache.org/" target="_top">Apache HTTPD</a> as your primary HTTP server, you can have it forward requests to the <a class="ulink" href="http://tomcat.apache.org/" target="_top">Tomcat servlet container</a> via <a class="ulink" href="http://tomcat.apache.org/connectors-doc/" target="_top">Apache Jakarta Tomcat Connector</a>. This can be configured to work over SSL as well. First, you must configure Apache for SSL; for Apache 2.0 see <a class="ulink" href="http://httpd.apache.org/docs/2.0/ssl/" target="_top">Apache SSL/TLS Encryption</a> for information about using <a class="ulink" href="http://httpd.apache.org/docs/2.0/mod/mod_ssl.html" target="_top">mod_ssl</a>.</p><p><span class="emphasis"><em>
<span class="bold"><strong>If you are using X.509 Client Certificates for authentication:</strong></span>
</em></span> add these configuration options to the appropriate <span class="emphasis"><em>httpd</em></span> configuration file, e.g. <code class="literal">ssl.conf</code>, and be sure they are in force for the virtual host and namespace locations dedicated to DSpace:</p><pre class="screen">
## SSLVerifyClient can be "optional" or
"require"
SSLVerifyClient optional
SSLVerifyDepth 10
SSLCACertificateFile <span class="emphasis"><em>
path-to-your-client-CA-certificate</em></span>
SSLOptions StdEnvVars ExportCertData
</pre><p>Now consult the <a class="ulink" href="http://tomcat.apache.org/connectors-doc/" target="_top">Apache Jakarta Tomcat Connector</a> documentation to configure the <code class="literal">mod_jk</code> (note: <span class="bold"><strong>NOT</strong></span><code class="literal">mod_jk2</code>) module. Select the AJP 1.3 connector protocol. Also follow the instructions there to configure your Tomcat server to respond to AJP.</p><p><span class="bold"><strong>To use SSL on Apache HTTPD with mod_webapp</strong></span> consult the DSpace 1.3.2 documentation. Apache have deprecated the <code class="literal">mod_webapp</code> connector and recommend using <code class="literal">mod_jk</code>.</p><p><span class="bold"><strong>To use Jetty's HTTPS support</strong></span> consult the documentation for the relevant tool.</p></div></div><div class="section" title="3.4.4.&nbsp;The Handle Server"><div class="titlepage"><div><div><h3 class="title"><a name="N10C23"></a>3.4.4.&nbsp;<a name="docbook-install.html-handles"></a>The Handle Server</h3></div></div><div></div></div><p>First a few facts to clear up some common misconceptions:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> You don't <span class="bold"><strong>have</strong></span> to use CNRI's Handle system. At the moment, you need to change the code a little to use something else (e.g PURLs) but that should change soon.</p></li><li class="listitem"><p> You'll notice that while you've been playing around with a test server, DSpace has apparently been creating handles for you looking like <code class="literal">hdl:123456789/24</code> and so forth. These aren't really Handles, since the global Handle system doesn't actually know about them, and lots of other DSpace test installs will have created the same IDs.</p><p>They're only really Handles once you've registered a prefix with CNRI (see below) and have correctly set up the Handle server included in the DSpace distribution. This Handle server communicates with the rest of the global Handle infrastructure so that anyone that understands Handles can find the Handles your DSpace has created.</p></li></ul></div><p>If you want to use the Handle system, you'll need to set up a Handle server. This is included with DSpace. Note that this is not required in order to evaluate DSpace; you only need one if you are running a production service. You'll need to obtain a Handle prefix from <a class="ulink" href="http://www.handle.net/" target="_top">the central CNRI Handle site</a>.</p><p>A Handle server runs as a separate process that receives TCP requests from other Handle servers, and issues resolution requests to a global server or servers if a Handle entered locally does not correspond to some local content. The Handle protocol is based on TCP, so it will need to be installed on a server that can broadcast and receive TCP on port 2641.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>To configure your DSpace installation to run the handle server, run the following command:</p><p><code class="literal">[dspace]/bin/dspace make-handle-config</code></p><p>Ensure that <code class="literal">[dspace]/handle-server</code> matches whatever you have in <code class="literal">dspace.cfg</code> for the <code class="literal">handle.dir</code> property.</p></li><li class="listitem"><p>Edit the resulting <code class="literal">[dspace]/handle-server/config.dct</code> file to include the following lines in the <code class="literal">"server_config"</code> clause: </p><pre class="screen">"storage_type" = "CUSTOM"
"storage_class" = "org.dspace.handle.HandlePlugin"
</pre><p>This tells the Handle server to get information about individual Handles from the DSpace code.</p></li><li class="listitem"><p>Once the configuration file has been generated, you will need to go to <a class="ulink" href="http://hdl.handle.net/4263537/5014" target="_top">http://hdl.handle.net/4263537/5014</a> to upload the generated sitebndl.zip file. The upload page will ask you for your contact information. An administrator will then create the naming authority/prefix on the root service (known as the Global Handle Registry), and notify you when this has been completed. You will not be able to continue the handle server installation until you receive further information concerning your naming authority.</p></li><li class="listitem"><p>When CNRI has sent you your naming authority prefix, you will need to edit the <code class="literal">config.dct</code> file. The file will be found in <code class="literal">/[dspace]/handle-server</code>. </p><p>Look for <code class="literal">"300:0.NA/YOUR_NAMING_AUTHORITY"</code></p><p>Replace <code class="literal">YOUR_NAMING_AUTHORITY</code> with the assigned naming authority prefix sent to you.</p></li><li class="listitem"><p>Now start your handle server (as the dspace user):</p><pre class="screen">[dspace]/bin/start-handle-server</pre></li></ol></div><p>Note that since the DSpace code manages individual Handles, administrative operations such as Handle creation and modification aren't supported by DSpace's Handle server.</p><div class="section" title="3.4.4.1.&nbsp;Updating Existing Handle Prefixes"><div class="titlepage"><div><div><h4 class="title"><a name="N10C92"></a>3.4.4.1.&nbsp;Updating Existing Handle Prefixes</h4></div></div><div></div></div><p>If you need to update the handle prefix on items created before the CNRI registration process you can run the <code class="literal">[dspace]/bin/update-handle-prefix script</code>. You may need to do this if you loaded items prior to CNRI registration (e.g. setting up a demonstration system prior to migrating it to production). The script takes the current and new prefix as parameters. For example:</p><pre class="screen">[dspace]/bin/update-handle-prefix 123456789 1303
</pre><p>This script will change any handles currently assigned prefix 123456789 to prefix 1303, so for example handle 123456789/23 will be updated to 1303/23 in the database.</p></div></div><div class="section" title="3.4.5.&nbsp;Google and HTML sitemaps"><div class="titlepage"><div><div><h3 class="title"><a name="N10CA1"></a>3.4.5.&nbsp;<a name="docbook-install.html-sitemaps"></a>Google and HTML sitemaps</h3></div></div><div></div></div><p>To aid web crawlers index the content within your repository, you can make use of sitemaps. There are currently two forms of sitemaps included in DSpace; Google sitemaps and HTML sitemaps.</p><p>Sitemaps allow DSpace to expose it's content without the crawlers having to index every page. HTML sitemaps provide a list of all items, collections and communities in HTML format, whilst Google sitemaps provide the same information in gzipped XML format.</p><p>To generate the sitemaps, you need to run <code class="literal">[dspace]/bin/generate-sitemaps</code> This creates the sitemaps in <code class="literal">[dspace]/sitemaps/</code></p><p>The sitemaps can be accessed from the following URLs:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> http://dspace.example.com/dspace/sitemap - Index sitemap</p></li><li class="listitem"><p> http://dspace.example.com/dspace/sitemap?map=0 - First list of items (up to 50,000)</p></li><li class="listitem"><p> http://dspace.example.com/dspace/sitemap?map=n - Subsequent lists of items (e.g. 50,0001 to 100,000) etc...</p></li></ul></div><p> HTML sitemaps follow the same procedure: <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> http://dspace.example.com/dspace/htmlmap - Index sitemap</p></li><li class="listitem"><p> etc...</p></li></ul></div></p><p> When running <code class="literal">[dspace]/bin/generate-sitemaps</code> the script informs Google that the sitemaps have been updated. For this update to register correctly, you must first register your Google sitemap index page (<code class="literal">/dspace/sitemap</code>) with Google at <a class="ulink" href="http://www.google.com/webmasters/sitemaps/" target="_top">http://www.google.com/webmasters/sitemaps/</a>. If your DSpace server requires the use of a HTTP proxy to connect to the Internet, ensure that you have set <code class="literal">http.proxy.host</code> and <code class="literal">http.proxy.port</code> in <code class="literal">[dspace]/config/dspace.cfg</code></p><p>The URL for pinging Google, and in future, other search engines, is configured in <code class="literal">[dspace-space]/config/dspace.cfg</code> using the <code class="literal">sitemap.engineurls</code> setting where you can provide a comma-separated list of URLs to 'ping'.</p><p>You can generate the sitemaps automatically every day using an additional cron job:</p><pre class="screen">
# Generate sitemaps
0 6 * * * [dspace]/bin/generate-sitemaps
</pre></div><div class="section" title="3.4.6.&nbsp;DSpace Statistics"><div class="titlepage"><div><div><h3 class="title"><a name="N10CF2"></a>3.4.6.&nbsp;<a name="docbook-install.html-solr"></a>DSpace Statistics</h3></div></div><div></div></div><p>DSpace uses the Apache Solr application underlaying the statistics. There is no need to download any separate software. All the necessary software is included. To understand all of the configuration property keys, the user should refer to<a class="link" href="ch05.html#docbook-configure.html-statistics"> 5.2.35 DSpace Statistic Configuration</a> for detailed information.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><span class="bold"><strong>DSpace Configuration for Accessing SOLR.</strong></span> In the <code class="literal">dspace.cfg</code> file review the following fields to make sure they are uncommented:</p><pre class="screen">solr.log.server = ${dspace.baseUrl}/solr/statistics
solr.dbfile = ${dspace.dir}/config/GeoLiteCity.dat
solr.spiderips.urls = http://iplists.com/google.txt, \
http://iplists.com/inktomi.txt, \
http://iplists.com/lycos.txt, \
http://iplists.com/infoseek.txt, \
http://iplists.com/altavista.txt, \
http://iplists.com/excite.txt, \
http://iplists.com/misc.txt, \
http://iplists.com/non_engines.txt
useProxies = true</pre></li><li class="listitem"><p><span class="bold"><strong>DSpace configuration for fields indexed into Solr Event records for search.</strong></span> In the <code class="literal">dspace.cfg</code> file, review the following property keys to make sure they are uncommented:</p><pre class="screen">statistics.items.dc.1=dc.identifier
statistics.items.dc.2=dc.date.accessioned
statistics.items.type.1=dcinput
statistics.items.type.2=date
statistics.default.start.datepick = 01/01/1977</pre></li><li class="listitem"><p><span class="bold"><strong>Configuration Control.</strong></span> In the <code class="literal">dspace.cfg</code> set the following property key:</p><p><code class="literal">statistics.item.authorization.admin=true</code></p><p>This will require the user to sign on to see that statistics. Setting the statistics to "false" will make them publicly available.</p></li><li class="listitem"><p>Final steps.</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Perform the following step:</p><pre class="screen">
cd [dspace-source]/dspace
mvn package
cd [dspace-source]/dspace/target/dspace-&lt;version&gt;-build.dir
ant -Dconfig=[dspace]/config/dspace.cfg update
cp -R [dspace]/webapps/* [TOMCAT]/webapps
</pre><p>If you only need to build the statistics, and don't make any changes to other web applications, you can replace the copy step above with:</p><p><code class="literal">cp -R [dspace]/webapps/solr [TOMCAT]/webapps</code></p></li><li class="listitem"><p>Restart your webapps (Tomcat/Jetty/Resin)</p></li></ul></div></li></ol></div></div></div><div class="section" title="3.5.&nbsp;Windows Installation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="N10D3F"></a>3.5.&nbsp;<a name="docbook-install.html-windows"></a>Windows Installation</h2></div></div><div></div></div><div class="section" title="3.5.1.&nbsp;Pre-requisite Software"><div class="titlepage"><div><div><h3 class="title"><a name="N10D46"></a>3.5.1.&nbsp;Pre-requisite Software</h3></div></div><div></div></div><p>You'll need to install this pre-requisite software:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<a class="ulink" href="http://java.sun.com/" target="_top">Java SDK 1.5</a> or later (standard SDK is fine, you don't need J2EE)</p></li><li class="listitem"><p>
<a class="ulink" href="http://www.postgresql.org/ftp/" target="_top">PostgreSQL 8.x for Windows</a> OR <a class="ulink" href="http://www.oracle.com/database/" target="_top">Oracle 9 or later</a>.</p><div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p> If you install PostgreSQL, it's recommended to select to install the pgAdmin III tool</p></li></ul></div></li><li class="listitem"><p>
<a class="ulink" href="http://ant.apache.org/" target="_top">Apache Ant 1.6.2 or later</a>. Unzip the package in <code class="literal">C:\</code> and add <code class="literal">C:\apache-ant-1.6.2\bin</code> to the <code class="literal">PATH</code> environment variable. For Ant to work properly, you should ensure that <code class="literal">JAVA_HOME</code> is set.</p></li><li class="listitem"><p>
<a class="ulink" href="http://tomcat.apache.org/" target="_top">Jakarta Tomcat 5.x or later</a>
</p></li><li class="listitem"><p>
<a class="ulink" href="http://maven.apache.org/" target="_top">Apache Maven 2.0.8 or later</a>
</p></li></ul></div></div><div class="section" title="3.5.2.&nbsp;Installation Steps"><div class="titlepage"><div><div><h3 class="title"><a name="N10D88"></a>3.5.2.&nbsp;Installation Steps</h3></div></div><div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> Download the DSpace source from <a class="ulink" href="http://sourceforge.net/projects/dspace" target="_top">SourceForge</a> and untar it (<a class="ulink" href="http://www.winzip.com/" target="_top">WinZip</a> will do this)</p></li><li class="listitem"><p> Ensure the PostgreSQL service is running, and then run pgAdmin III (Start -&gt; PostgreSQL 8.0 -&gt; pgAdmin III). Connect to the local database as the postgres user and:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> Create a 'Login Role' (user) called <code class="literal">dspace</code> with the password <code class="literal">dspace</code></p></li><li class="listitem"><p> Create a database called <code class="literal">dspace</code> owned by the user <code class="literal">dspace</code>, with UTF-8 encoding</p></li></ul></div></li><li class="listitem"><p> Update paths in <code class="literal">[dspace-source]\dspace\config\dspace.cfg</code>. <span class="bold"><strong>Note:</strong></span> Use forward slashes / for path separators, though you can still use drive letters, e.g.:</p><p>
<code class="literal">dspace.dir = C:/DSpace</code>
</p><p>Make sure you change all of the parameters with file paths to suit, specifically:</p><pre class="screen">
dspace.dir
config.template.log4j.properties
config.template.log4j-handle-plugin.properties
config.template.oaicat.properties
assetstore.dir
log.dir
upload.temp.dir
report.dir
handle.dir
</pre></li><li class="listitem"><p> Create the directory for the DSpace installation (e.g. <code class="literal">C:\DSpace</code>)</p></li><li class="listitem"><p> Generate the DSpace installation package by running the following from command line (cmd) from your <code class="literal">[dspace-source]/dspace/</code> directory: </p><pre class="screen">
mvn package
</pre><p>Note #1: This will generate the DSpace installation package in your <code class="literal">[dspace-source]/dspace/target/dspace-[version]-build.dir/</code> directory.</p><p>Note #2: Without any extra arguments, the DSpace installation package is initialized for PostgreSQL.</p><p> If you want to use Oracle instead, you should build the DSpace installation package as follows:</p><pre class="screen">
mvn -Ddb.name=oracle package
</pre></li><li class="listitem"><p> Initialize the DSpace database and install DSpace to <code class="literal">[dspace]</code> (e.g. <code class="literal">C:\DSpace</code>) by running the following from command line from your <code class="literal">[dspace-source]/dspace/target/dspace-[version]-build.dir/</code> directory:</p><pre class="screen">
ant fresh_install
</pre><p><span class="bold"><strong>Note:</strong></span> to see a complete list of build targets, run</p><pre class="screen">
ant help
</pre></li><li class="listitem"><p> Create an administrator account, by running the following from your <code class="literal">[dspace]</code> (e.g. <code class="literal">C:\DSpace</code>) directory</p><p>
<code class="literal">[dspace]\bin\dsrun org.dspace.administer.CreateAdministrator</code>
</p><p>and enter the required information</p></li><li class="listitem"><p> Copy the Web application directories from <code class="literal">[dspace]\webapps\</code> to Tomcat's webapps dir, which should be somewhere like <code class="literal">C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps</code></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> Alternatively, Tell your Tomcat installation where to find your DSpace web application(s). As an example, in the <code class="literal">&lt;Host&gt;</code> section of your <code class="literal">[tomcat]/conf/server.xml</code> you could add lines similar to the following (but replace <code class="literal">[dspace]</code> with your installation location):</p><pre class="screen">
&lt;!-- DEFINE A CONTEXT PATH FOR DSpace JSP User Interface --&gt;
&lt;Context path="/jspui" docBase="[dspace]\webapps\jspui" debug="0"
reloadable="true" cachingAllowed="false"
allowLinking="true"/&gt;
&lt;!-- DEFINE A CONTEXT PATH FOR DSpace OAI User Interface --&gt;
&lt;Context path="/oai" docBase="[dspace]\webapps\oai" debug="0"
reloadable="true" cachingAllowed="false"
allowLinking="true"/&gt;
</pre></li></ul></div></li><li class="listitem"><p> Start the Tomcat service</p></li><li class="listitem"><p> Browse to either <code class="literal">http://localhost:8080/jspui</code> or <code class="literal">http://localhost:8080/xmlui</code>. You should see the DSpace home page for either the JSPUI or XMLUI, respectively.</p></li></ol></div></div></div><div class="section" title="3.6.&nbsp;Checking Your Installation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="N10E3F"></a>3.6.&nbsp;<a name="docbook-install.html-checking"></a>Checking Your Installation</h2></div></div><div></div></div><p>The administrator needs to check the installation to make sure all components are working. Here is list of checks to be performed. In brackets after each item, it the associated component or components that might be the issue needing resolution.</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>System is up and running.</p><p><span class="emphasis"><em>User can see the DSpace home page. [Tomcat/Jetty, firewall, IP assignment, DNS]</em></span></p></li><li class="listitem"><p>Database is running and working correctly.</p><p><span class="emphasis"><em>Attempt to create a user, community or collection [PostgreSQL, Oracle]</em></span></p><p><span class="emphasis"><em>Run the test database command to see if other issues are being report:</em></span></p><p><code class="literal">[dspace]/bin/dspace test-database</code></p></li><li class="listitem"><p>Email subsystem is running.</p><p>The user can issue the following command to test the email system. t attempts to send a test email to the email address that is set in dspace.cfg (mail.admin). If it fails, you will get messages informing you as to why, will refer you to the DSpace documentation.</p><p><code class="literal">[dspace]/bin/test-email</code></p></li></ul></div></div><div class="section" title="3.7.&nbsp;Known Bugs"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="N10E65"></a>3.7.&nbsp;<a name="docbook-install.html-knownbugs"></a>Known Bugs</h2></div></div><div></div></div><p>In any software project of the scale of DSpace, there will be bugs. Sometimes, a stable version of DSpace includes known bugs. We do not always wait until every known bug is fixed before a release. If the software is sufficiently stable and an improvement on the previous release, and the bugs are minor and have known workarounds, we release it to enable the community to take advantage of those improvements.</p><p>The known bugs in a release are documented in the <code class="literal">KNOWN_BUGS</code> file in the source package.</p><p>Please see the <a class="ulink" href="#" target="_top">DSpace bug tracker</a> for further information on current bugs, and to find out if the bug has subsequently been fixed. This is also where you can report any further bugs you find.</p></div><div class="section" title="3.8.&nbsp;Common Problems"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="N10E7A"></a>3.8.&nbsp;<a name="docbook-install.html-problems"></a>Common Problems</h2></div></div><div></div></div><p>In an ideal world everyone would follow the above steps and have a fully functioning DSpace. Of course, in the real world it doesn't always seem to work out that way. This section lists common problems that people encounter when installing DSpace, and likely causes and fixes. This is likely to grow over time as we learn about users' experiences.</p><div class="variablelist"><dl><dt><span class="term">Database errors occur when you run <code class="literal">ant fresh_install</code></span></dt><dd><p> There are two common errors that occur. If your error looks like this--</p><pre class="screen">[java] 2004-03-25 15:17:07,730 INFO
org.dspace.storage.rdbms.InitializeDatabase @ Initializing Database
[java] 2004-03-25 15:17:08,816 FATAL
org.dspace.storage.rdbms.InitializeDatabase @ Caught exception:
[java] org.postgresql.util.PSQLException: Connection refused. Check
that the hostname and port are correct and that the postmaster is
accepting TCP/IP connections.
[java] at
org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJd
bc1Connection.java:204)
[java] at org.postgresql.Driver.connect(Driver.java:139)</pre><p>it usually means you haven't yet added the relevant configuration parameter to your PostgreSQL configuration <a class="link" href="ch03.html#docbook-install.xml-postgresql">(see above)</a>, or perhaps you haven't restarted PostgreSQL after making the change. Also, make sure that the <code class="literal">db.username</code> and <code class="literal">db.password</code> properties are correctly set in <code class="literal">[dspace-source]/config/dspace.cfg</code>.</p><p>An easy way to check that your DB is working OK over TCP/IP is to try this on the command line:</p><pre class="screen">
psql -U dspace -W -h localhost</pre><p>Enter the <code class="literal">dspace</code><span class="emphasis"><em>database</em></span> password, and you should be dropped into the psql tool with a <code class="literal">dspace=&gt;</code> prompt.</p><p>Another common error looks like this:</p><pre class="screen">[java] 2004-03-25 16:37:16,757 INFO
org.dspace.storage.rdbms.InitializeDatabase @ Initializing Database
[java] 2004-03-25 16:37:17,139 WARN
org.dspace.storage.rdbms.DatabaseManager @ Exception initializing DB
pool
[java] java.lang.ClassNotFoundException: org.postgresql.Driver
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
[java] at java.security.AccessController.doPrivileged(Native
Method)
[java] at
java.net.URLClassLoader.findClass(URLClassLoader.java:186)</pre><p>This means that the PostgreSQL JDBC driver is not present in <code class="literal">[dspace-source]/lib</code>. <a class="link" href="ch03.html#docbook-install.html-pgdriver">See above.</a></p></dd><dt><span class="term">Tomcat doesn't shut down</span></dt><dd><p> If you're trying to tweak Tomcat's configuration but nothing seems to make a difference to the error you're seeing, you might find that Tomcat hasn't been shutting down properly, perhaps because it's waiting for a stale connection to close gracefully which won't happen. To see if this is the case, try:</p><pre class="screen">
ps -ef | grep java</pre><p>and look for Tomcat's Java processes. If they stay around after running Tomcat's <code class="literal">shutdown.sh</code> script, trying <code class="literal">kill</code>ing them (with <code class="literal">-9</code> if necessary), then starting Tomcat again.</p></dd><dt><span class="term">Database connections don't work, or accessing DSpace takes forever</span></dt><dd><p> If you find that when you try to access a DSpace Web page and your browser sits there connecting, or if the database connections fail, you might find that a 'zombie' database connection is hanging around preventing normal operation. To see if this is the case, try:</p><pre class="screen">ps -ef | grep postgres</pre><p>You might see some processes like this</p><pre class="screen">dspace 16325 1997 0 Feb 14 ? 0:00 postgres: dspace dspace
127.0.0.1 idle in transaction</pre><p>This is normal--DSpace maintains a 'pool' of open database connections, which are re-used to avoid the overhead of constantly opening and closing connections. If they're 'idle' it's OK; they're waiting to be used. However sometimes, if something went wrong, they might be stuck in the middle of a query, which seems to prevent other connections from operating, e.g.:</p><pre class="screen">dspace 16325 1997 0 Feb 14 ? 0:00 postgres: dspace dspace
127.0.0.1 SELECT</pre><p>This means the connection is in the middle of a <code class="literal">SELECT</code> operation, and if you're not using DSpace right that instant, it's probably a 'zombie' connection. If this is the case, try <code class="literal">kill</code>ing the process, and stopping and restarting Tomcat.</p></dd></dl></div></div></div><HR><p class="copyright">Copyright <20> 2002-2010
<a class="ulink" href="http://www.duraspace.org/" target="_top">DuraSpace</a>
</p><div class="legalnotice" title="Legal Notice"><a name="N1001D"></a><p>
<a class="ulink" href="http://creativecommons.org/licenses/by/3.0/us/" target="_top">
<span class="inlinemediaobject"><img src="http://i.creativecommons.org/l/by/3.0/us/88x31.png"></span>
</a>
</p><p>Licensed under a Creative Commons Attribution 3.0 United States License</p></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="ch02.html">Prev</a>&nbsp;</td><td align="center" width="20%">&nbsp;</td><td align="right" width="40%">&nbsp;<a accesskey="n" href="ch04.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">Chapter&nbsp;2.&nbsp;DSpace System Documentation: Functional Overview&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;Chapter&nbsp;4.&nbsp;DSpace System Documentation: Upgrading a DSpace Installation</td></tr></table></div></body></html>