mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 14:33:09 +00:00

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2605 9c30dcfa-912a-0410-8fc2-9e0234be79fd
928 lines
55 KiB
HTML
928 lines
55 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>DSpace System Documentation: Installation</TITLE>
|
|
<LINK REL=StyleSheet HREF="style.css" TYPE="text/css">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>DSpace System Documentation: Installation</H1>
|
|
|
|
<P><A HREF="index.html">Back to contents</A></P>
|
|
|
|
<P> </P>
|
|
<P><strong>Installation Table of Contents</strong>
|
|
<UL>
|
|
<LI><A HREF="install.html#prerequisite">Prerequisite Software</A></LI>
|
|
<LI><A HREF="install.html#installoptions">Installation Options</A>
|
|
<UL>
|
|
<LI><A HREF="install.html#options">Overview of Install Options</A></LI>
|
|
<LI><A HREF="install.html#directories">Overview of DSpace Directories</A></LI>
|
|
<LI><A HREF="install.html#installsteps">Quick Installation Method</A></LI>
|
|
<LI><A HREF="install.html#maveninstall">Maven-based Installation Method</A></LI>
|
|
</UL>
|
|
</LI>
|
|
<LI><A HREF="install.html#advancedinstall">Advanced Installation Options</A></LI>
|
|
<li><a href="install.html#windows">Windows Installation</a></li>
|
|
<LI><A HREF="install.html#knownbugs">Known Bugs</A></LI>
|
|
<LI><A HREF="install.html#problems">Common Problems</A></LI>
|
|
</UL>
|
|
</P>
|
|
|
|
<H2><A NAME="prerequisite">Prerequisite Software</A></H2>
|
|
|
|
<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>
|
|
|
|
<ol>
|
|
<li><P>UNIX-like OS (Linux, HP/UX etc) or Microsoft Windows (see full <a href="#windows">Windows Instructions</a> for full set of Windows prerequisites)</P> </li>
|
|
|
|
<li><P><A HREF="http://java.sun.com/">Java SDK 1.5</A> or later (standard SDK is fine, you don't need J2EE)</P></li>
|
|
|
|
<li><P><A HREF="http://ant.apache.org/">Apache Ant 1.6.2</A> or later (Java make-like tool)</P></li>
|
|
|
|
<li>
|
|
<P><A HREF="http://www.postgresql.org/">PostgreSQL 7.3</A> or later, an open source relational database, or <a href="http://www.oracle.com/database/">Oracle 9 or higher</A>.</P>
|
|
|
|
<UL>
|
|
<LI>
|
|
<P><strong>PostgreSQL</strong></P>
|
|
|
|
<P>Unicode (specifically UTF-8) support must be enabled. This is enabled by default in 8.0+. For 7.<em>x</em>, be sure to compile with the following options to the '<code>configure</code>' script:</P>
|
|
|
|
<PRE>--enable-multibyte --enable-unicode --with-java</PRE>
|
|
|
|
<P><A NAME="enabletcpip"></a>Once installed, you need to enable TCP/IP connections (DSpace uses JDBC). For 7.<em>x</em>, edit <code>postgresql.conf</code> (usually in <code>/usr/local/pgsql/data</code> or <code>/var/lib/pgsql/data</code>), and add this line:</P>
|
|
|
|
<PRE>tcpip_socket = true</PRE>
|
|
|
|
<P>For 8.0+, in <code>postgresql.conf</code> uncomment the line starting:</P>
|
|
|
|
<PRE>listen_addresses = 'localhost'</PRE>
|
|
|
|
<P>Then tighten up security a bit by editing <code>pg_hba.conf</code> and adding this line:</P>
|
|
|
|
<PRE>host dspace dspace 127.0.0.1 255.255.255.255 md5</PRE>
|
|
|
|
<P>Then restart PostgreSQL.</P>
|
|
</LI>
|
|
|
|
<LI>
|
|
<P><strong>Oracle</strong></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>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><STRONG>NOTE:</STRONG> 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>etc/update-sequences.sql</code>.</P>
|
|
|
|
<P><STRONG>ALSO NOTE:</STRONG> Everything is fully functional, although Oracle limits you to 4k of text in text fields such as item metadata or collection descriptions.</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>
|
|
|
|
</li>
|
|
|
|
<li><P><A HREF="http://jakarta.apache.org/tomcat/">Jakarta Tomcat 4.x</A> or later. DSpace will also run on an equivalent, such as <A HREF="http://www.mortbay.org/jetty/index.html">Jetty</A> or <A HREF="http://www.caucho.com/">Caucho Resin</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>dspace</code>'.</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>
|
|
|
|
<PRE>JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"</PRE>
|
|
|
|
<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><Connector></code> element in <code><i>[tomcat]</i>/config/server.xml</code>:</P>
|
|
|
|
<PRE>URIEncoding="UTF-8"</PRE>
|
|
|
|
<P>e.g. if you're using the default Tomcat config, it should read:</P>
|
|
|
|
<PRE><!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
|
|
<Connector port="8080"
|
|
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
|
|
enableLookups="false" redirectPort="8443" acceptCount="100"
|
|
connectionTimeout="20000" disableUploadTimeout="true"
|
|
<strong>URIEncoding="UTF-8"</strong> /></PRE>
|
|
|
|
<P>Jetty and Resin are configured for correct handling of UTF-8 by default.</P>
|
|
</li>
|
|
|
|
<li><P><A HREF="http://maven.apache.org/">Apache Maven 2</A> (Java project build manager)</P>
|
|
<P>Maven is necessary to build the installation package for DSpace, and apply any custom interface "overlay" changes.</P>
|
|
</li>
|
|
|
|
</ol>
|
|
|
|
<H2><A NAME="installoptions">Installation Options</A></H2>
|
|
|
|
<H3><A NAME="options">Overview of Install Options</A></H3>
|
|
|
|
<p>With the advent of a new Maven-based build architecture in DSpace 1.5.x,
|
|
you now have a few options in how you may wish to install and manage your
|
|
local installation of DSpace. There are now two different methods to installing
|
|
DSpace software. Which path you choose may be entirely dependent on your
|
|
institution's DSpace resources and technical knowledge:</p>
|
|
<p>
|
|
<ul>
|
|
<li><A href="#installsteps">Quick Installation Method</A>
|
|
<ul>
|
|
<li>As its name implies, this installation method is the quickest
|
|
and easiest. This method will be very familiar to you
|
|
if you've used DSpace 1.4.x or below, as it mirrors the old path
|
|
of installing and managing DSpace</li>
|
|
<li>This method allows you to customize DSpace configurations (in dspace.cfg)
|
|
or user interfaces, using basic pre-built interface "overlays". However, it will not allow you to customize or change the
|
|
underlying DSpace Java API, as <em>all Java code comes pre-compiled.</em></li>
|
|
<li><strong>This method is highly recommended for those who are new to DSpace,
|
|
may not have available technical staff for DSpace at their institutions,
|
|
or do not wish to make changes to the underlying DSpace Java API.</strong></li>
|
|
</ul>
|
|
</li>
|
|
<li><A href="#maveninstall">Maven-based Installation Method</A>
|
|
<ul>
|
|
<li>This installation method requires much more familiarity with
|
|
how
|
|
<A HREF="http://maven.apache.org/">Apache Maven 2</A> works.
|
|
This method provides your institution with more control over how DSpace
|
|
builds itself (especially in terms of adding completely custom/3rd-party DSpace
|
|
"modules" you wish to use). However, this route also requires that you (or someone at
|
|
your institution) learn the basics of how to use Maven, and potentially how to create
|
|
your own Maven Project Object Model (POM).</li>
|
|
<li>This method allows you the ability to create more complex user interface "overlays" in Maven.
|
|
An interface "overlay" allows you to only manage your local custom code (in your local CVS or SVN),
|
|
and automatically download the rest of the interface code from DSpace SVN whenever
|
|
you build DSpace. This means you wouldn't have to manage any of the out-of-the-box
|
|
DSpace interface code in your local CVS/SVN.</li>
|
|
<li><strong>This method is recommended for those who have technical staff at their
|
|
institutions devoted to DSpace, wish to create new DSpace modules or customize
|
|
the DSpace Java API, or just want to learn more about how Maven works.</strong></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</p>
|
|
|
|
<H3><A NAME="directories">Overview of DSpace Directories</A></H3>
|
|
|
|
<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>
|
|
<ol>
|
|
<li><strong>the installation directory</strong>, referred to as <i><code>[dspace]</code></i>. This is the location where
|
|
all the DSpace configuration files, command line scripts, documentation and webapps exist.</li>
|
|
<li><strong>the source directory</strong>, referred to as <i><code>[dspace-source]</code></i>. This is the location
|
|
where DSpace was initially downloaded to.</li>
|
|
<li><strong>the web deployment directory</strong>. This is the directory that contains
|
|
your DSpace web application(s). In DSpace 1.5.x and above, this corresponds
|
|
to <i><code>[dspace]/webapps</code></i> by default. However, if you are using Tomcat,
|
|
you may decide to copy your DSpace web applications from <i><code>[dspace]/webapps/</code></i> to <code><i>[tomcat]</i>/webapps/</code> (with <code><i>[tomcat]</i></code> being wherever
|
|
you installed Tomcat--also known as <code>$CATALINA_HOME</code>).</li>
|
|
</ol>
|
|
|
|
<p>For details on the contents of these separate directory trees, refer to
|
|
<a href="directories.html">directories.html</a>.
|
|
<em>Note that the <code>[dspace-source]</code> and <code>[dspace]</code> directories are always separate!</em></p>
|
|
|
|
|
|
<H3><A NAME="installsteps">Quick Installation Method</A></H3>
|
|
|
|
This method gets you up and running with DSpace quickly and easily. However, you should be aware
|
|
that it provides you with pre-compiled DSpace Java code. This means that if you are wanting to
|
|
change any of the underlying DSpace Java code, you should use the <A href="#maveninstall">Maven-based Installation Method</A> instead.
|
|
|
|
<ol>
|
|
<li>
|
|
<P>Create the DSpace user. This needs to be the same user that Tomcat (or Jetty etc) will run as. e.g. as root run:</P>
|
|
|
|
<PRE>useradd -m dspace</PRE>
|
|
</li>
|
|
<li>
|
|
<P>Download the <A HREF="http://sourceforge.net/projects/dspace/">latest DSpace source code</A> and unpack it
|
|
into a temporary location. It is not necessary to keep this directory around after you install DSpace.</P>
|
|
|
|
<PRE>gunzip -c dspace-1.x.tar.gz | tar -xf -</PRE>
|
|
|
|
<P>For ease of reference, we will refer to the location of this unzipped version
|
|
of the DSpace installation package as <code><i>[dspace-source]</i> in the
|
|
remainder of these instructions.</code>
|
|
|
|
</P>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<p>Database Setup</p>
|
|
<p><strong>Postgres: </strong>
|
|
<ol type="i">
|
|
<li>
|
|
<p><a name="pgdriver"></a>Copy the PostgreSQL JDBC driver (<code>.jar</code> file) into
|
|
<code><i>[dspace-source]</i>/lib</code>. If you compiled PostgreSQL yourself, it'll be in <code>postgresql-7.x.x/src/interfaces/jdbc/jars/postgresql.jar</code>. Alternatively you can download it directly from <a href="http://jdbc.postgresql.org/download.html">the PostgreSQL JDBC site</a>. Make sure you get the recommended driver for the version of PostgreSQL you're running.</p></li>
|
|
<li>
|
|
<p>Create a <code>dspace</code> database, owned by the <code>dspace</code> PostgreSQL user:</p>
|
|
|
|
<pre>createuser -U postgres -d -A -P dspace
|
|
createdb -U dspace -E UNICODE dspace</pre>
|
|
|
|
<p>Enter a password for the DSpace database. (This isn't the same as the <code>dspace</code> user's UNIX password.)</p>
|
|
</li>
|
|
</ol></p>
|
|
<p><strong>Oracle:</strong>
|
|
<ol type="i">
|
|
<li>
|
|
<p>Copy the Oracle JDBC driver into <code><i>[dspace-source]</i>/lib</code>.</p>
|
|
</li>
|
|
<li>
|
|
<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>dspace</code>,) and ensure that it has permissions to add and remove tables in the database.</p>
|
|
</li>
|
|
<li>
|
|
<p>Edit the config/dspace.cfg file in your source directory for the following settings:</p>
|
|
<pre>db.name = oracle
|
|
db.url = jdbc.oracle.thin:@//host:port/dspace
|
|
db.driver = oracle.jdbc.OracleDriver</pre>
|
|
</li>
|
|
<li>
|
|
<p>Go to <code><i>[dspace-source]</i>/etc/oracle</code> and copy the contents to their parent directory, overwriting the versions in the parent:
|
|
|
|
<pre>cd [dspace-source]/etc/oracle
|
|
cp * ..</pre>
|
|
<p>You now have Oracle-specific <code>.sql</code> files in your <code>etc</code> directory, and your dspace.cfg is modified to point to your Oracle database.</p>
|
|
</li>
|
|
</ol></p>
|
|
</li>
|
|
|
|
<li>
|
|
<P>Edit <code><i>[dspace-source]</i>/config/dspace.cfg</code>, in particular you'll need to set these properties:
|
|
|
|
<br><code>dspace.dir</code> -- must be set to the <code>[dspace]</code> (installation) directory.
|
|
|
|
<br><code>dspace.url</code> -- complete URL of this server's DSpace home page.
|
|
|
|
<br><code>dspace.hostname</code> -- fully-qualified domain name of web server.
|
|
|
|
<br><code>dspace.name</code> -- "Proper" name of your server, e.g. "My Digital Library".
|
|
|
|
<br><code>db.password</code> -- the database password you entered in the previous step.
|
|
|
|
<br><code>mail.server</code> -- fully-qualified domain name of your outgoing mail server.
|
|
|
|
<br><code>mail.from.address</code> -- the "From:" address to put on email sent by DSpace.
|
|
|
|
<br><code>feedback.recipient</code> -- mailbox for feedback mail.
|
|
|
|
<br><code>mail.admin</code> -- mailbox for DSpace site administrator.
|
|
|
|
<br><code>alert.recipient</code> -- mailbox for server errors/alerts (not essential but very useful!)
|
|
|
|
<br><code>registration.notify</code> -- mailbox for emails when new users register (optional)
|
|
|
|
<p>
|
|
<b>NOTE:</b> You can interpolate the value of one configuration variable
|
|
in the value of another one. For example, to set <code>feedback.recipient</code>
|
|
to the same value as <code>mail.admin</code>, the line would look like:
|
|
<pre> feedback.recipient = ${mail.admin}</pre>
|
|
See the <code>dspace.cfg</code> file for examples.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
<P>Create the directory for the DSpace installation (i.e. <code>[dspace]</code>). As <em>root</em> (or a user with appropriate permissions), run:</P>
|
|
|
|
<PRE>mkdir <i>[dspace]</i>
|
|
chown dspace <i>[dspace]</i></PRE>
|
|
|
|
<P>(Assuming the <code>dspace</code> UNIX username.)</P>
|
|
</li>
|
|
|
|
<li>
|
|
<P>As the <code>dspace</code> UNIX user, generate the DSpace installation package in the <code><i>[dspace-source]</i>/target/dspace-[version].dir/</code> directory:</P>
|
|
<pre>cd <i>[dspace-source]</i>
|
|
mvn package</pre>
|
|
|
|
<P>Note: without any extra arguments, the DSpace installation package is initialized for PostgreSQL. If you want to use Oracle instead,
|
|
you should build the DSpace installation package as follows:</P>
|
|
|
|
<PRE>mvn -Ddb.name=oracle package</PRE>
|
|
|
|
<li>
|
|
<P>As the <code>dspace</code> UNIX user, initialize the DSpace database and install DSpace to <code><i>[dspace]</i></code>:</P>
|
|
|
|
<pre>cd <i>[dspace-source]</i>/target/dspace-[version].dir/
|
|
ant fresh_install</pre>
|
|
|
|
<P><strong>Note:</strong> to see a complete list of build targets, run</P>
|
|
|
|
<pre>ant help</pre>
|
|
|
|
<P>The most likely thing to go wrong here is the database connection. See the <A HREF="#problems">common problems section</A>.</P>
|
|
</li>
|
|
|
|
<li>
|
|
<P>Tell your Tomcat/Jetty/Resin installation where to find your DSpace web application(s).
|
|
As an example, in the <code><Host></code> section of your <code><em>[tomcat]</em>/conf/server.xml</code> you could add lines similar to the following
|
|
(but replace <code><em>[dspace]</em></code> with your installation location):</P>
|
|
|
|
<PRE><!-- DEFINE A CONTEXT PATH FOR DSpace JSP User Interface -->
|
|
<Context path="/dspace-jspui" docBase="[dspace]\webapps\dspace-jspui" debug="0" reloadable="true" cachingAllowed="false" allowLinking="true"/>
|
|
|
|
<!-- DEFINE A CONTEXT PATH FOR DSpace OAI User Interface -->
|
|
<Context path="/dspace-oai" docBase="[dspace]\webapps\dspace-oai" debug="0" reloadable="true" cachingAllowed="false" allowLinking="true"/></PRE>
|
|
|
|
<P>Alternatively, you could copy only the DSpace Web application(s) you wish to use from <code><em>[dspace]</em>/webapps</code> to the appropriate directory in your Tomcat/Jetty/Resin installation. For example:</P>
|
|
|
|
<PRE>cp -r <i>[dspace]</i>/webapps/dspace-jspui <i>[tomcat]</i>/webapps
|
|
cp -r <i>[dspace]</i>/webapps/dspace-oai <i>[tomcat]</i>/webapps</PRE>
|
|
|
|
</li>
|
|
|
|
<LI>
|
|
<p>Create an initial administrator account:</p>
|
|
|
|
<pre><i>[dspace]</i>/bin/create-administrator</pre>
|
|
</LI>
|
|
|
|
<LI>
|
|
<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>
|
|
<UL>
|
|
<li><em>JSP User Interface</em> - (e.g.) http://dspace.myu.edu:8080/dspace-jspui</li>
|
|
<li><em>XML User Interface (aka. Manakin)</em> - (e.g.) http://dspace.myu.edu:8080/dspace-xmlui-webapp</li>
|
|
<li><em>OAI-PMH Interface</em> - (e.g.) http://dspace.myu.edu:8080/dspace-oai/request?verb=identify (Should return an XML-based response)</li>
|
|
</UL>
|
|
</LI>
|
|
</ol>
|
|
|
|
<p>In order to set up some communities and collections, you'll need to login as your DSpace Administrator (which you created with <code>create-administrator</code> above) and access the administration UI in either the JSP or XML user interface.</P>
|
|
|
|
<H3><A NAME="maveninstall">Maven-based Installation Method</A></H3>
|
|
|
|
<P>This method allows you to build your own custom version of DSpace using <A HREF="http://maven.apache.org/">Apache Maven 2</A>.
|
|
If you are not wanting to custom any of DSpace's Java API, or just want to get up and running quickly,
|
|
it is recommend that you use the <A href="#installsteps">Quick Installation Method</A> instead.</P>
|
|
|
|
<P><strong>Additional Prerequisites</strong>
|
|
<ul>
|
|
<li><A href="http://subversion.tigris.org/">Subversion (SVN)</A> - Necessary to checkout the DSpace source code from SourceForge SVN</li>
|
|
</ul>
|
|
</P>
|
|
|
|
<P><strong>Build & Install Steps</strong>
|
|
<ol>
|
|
<li>
|
|
<P>Create the DSpace user. This needs to be the same user that Tomcat (or Jetty etc) will run as. e.g. as root run:</P>
|
|
|
|
<PRE>useradd -m dspace</PRE>
|
|
</li>
|
|
<li>
|
|
<P>Create the parent directory for the DSpace modules to reside (i.e. <code>[dspace-parent]</code>). As <em>root</em> (or a user with appropriate permissions), run:</P>
|
|
|
|
<PRE>mkdir <i>[dspace-parent]</i>
|
|
chown dspace <i>[dspace-parent]</i></PRE>
|
|
|
|
<P>(Assuming the <code>dspace</code> UNIX username.)</P>
|
|
</li>
|
|
<li>
|
|
<P>Checkout the DSpace Source code from SourceForge SVN into <code>[dspace-parent]</code>. For example:</P>
|
|
|
|
<PRE>svn co https://dspace.svn.sourceforge.net/svnroot/dspace/tags/dspace-1_5 [dspace-parent]</PRE>
|
|
|
|
<P>If you wish, you can choose to <em>only</em> checkout the source code for the specific DSpace "modules"
|
|
which you want to install. However, you must <em>always</em> checkout the <code>'dspace'</code> module, as
|
|
it is the module which builds DSpace. For example, if you only want to install the XML-UI and the OAI-PMH interface
|
|
you can perform the following checkouts:</P>
|
|
|
|
<PRE>svn co https://dspace.svn.sourceforge.net/svnroot/dspace/tags/dspace-1_5/dspace [dspace-parent]
|
|
svn co https://dspace.svn.sourceforge.net/svnroot/dspace/tags/dspace-1_5/dspace-xmlui [dspace-parent]
|
|
svn co https://dspace.svn.sourceforge.net/svnroot/dspace/tags/dspace-1_5/dspace-oai [dspace-parent]
|
|
</PRE>
|
|
|
|
<P>In order, you are checking out the <code>'dspace'</code> module (builds DSpace),
|
|
<code>'dspace-xmlui'</code> module (provides XML-UI), and <code>'dspace-oai'</code> module (provides OAI-PMH).</P>
|
|
|
|
<P>In the end, you should have a folder structure similar to the following in <code><i>[dspace-parent]</i></code>:
|
|
<ul>
|
|
<li><code><i>[dspace-parent]</i></code>
|
|
<ul>
|
|
<li><code>dspace/</code> - DSpace 'build' and configuration module (this is what is normally referred to as <code><i>[dspace-source]</i></code>)</li>
|
|
<li><code>dspace-api/</code> - DSpace Java API module</li>
|
|
<li><code>dspace-jspui/</code> - DSpace JSP-UI module</li>
|
|
<li><code>dspace-oai/</code> - DSpace OAI-PMH interface module</li>
|
|
<li><code>dspace-xmlui/</code> - DSpace XML-UI module</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<P>Build your custom DSpace installation package (from within the <code>'dspace'</code> module)</P>
|
|
|
|
<PRE>cd [dspace-parent]/dspace/
|
|
mvn package</PRE>
|
|
|
|
<P>Note: without any extra arguments, DSpace is built for PostgreSQL. If you want to use Oracle instead,
|
|
you should build DSpace as follows:</P>
|
|
|
|
<PRE>mvn -Ddb.name=oracle package</PRE>
|
|
</li>
|
|
<li>
|
|
<P>Building DSpace may take awhile. But, once it is complete, you should have your
|
|
custom DSpace installation package ready in your
|
|
<code><i>[dspace-parent]</i>/dspace/target/dspace-[version].dir/</code> directory.</P>
|
|
<P>Note: Although we won't go into this in detail, you can also create your own
|
|
completely custom Maven-based modules in your <code><i>[dspace-parent]</i></code> directory.
|
|
To build your custom modules into DSpace, you would need to modify the <code>'dspace'</code>
|
|
module's <code>pom.xml</code> (Project Object Model) to look for those custom modules, and
|
|
then re-build your DSpace installation package. Look
|
|
at the <a href="http://maven.apache.org/">Maven Documentation</a> or
|
|
<a href="http://wiki.dspace.org/">DSpace Wiki</a> for more hints and tricks.</P>
|
|
</li>
|
|
<li><P>Once your DSpace installation package has been built, you can follow the steps in the
|
|
<A href="#installsteps">Quick Installation Method</A> above to finish installing and configure DSpace.
|
|
Just remember that you can <em>skip</em> downloading the DSpace Source Code from
|
|
SourceForge. In addition, remember that your <code><i>[dspace-parent]</i>/dspace</code> module is
|
|
the <i>same</i> as what is referred to as <code><i>[dspace-source]</i></code></P>
|
|
</li>
|
|
</ol>
|
|
</P>
|
|
|
|
<P><strong>Useful Maven References</strong>
|
|
<ul>
|
|
<li><A HREF="http://maven.apache.org/">Maven Homepage</A> - The place to go for all things Maven...it also includes links to the below resources.</li>
|
|
<li><A HREF="http://maven.apache.org/users/">Maven User Centre</A> - Basic documentation and Tutorials for Maven. Also has a Project Object Model (POM) reference.</li>
|
|
<li><A href="http://maven.apache.org/plugins/">Maven Plugins</A> - Various Maven plugins you can take advantage of in your Maven POMs.</li>
|
|
</ul>
|
|
</P>
|
|
|
|
|
|
<H2><A NAME="advancedinstall">Advanced Installation</A></H2>
|
|
|
|
<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>
|
|
|
|
<H3>'cron' Jobs</H3>
|
|
|
|
<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>dspace</code> UNIX user:</P>
|
|
|
|
<PRE>crontab -e</PRE>
|
|
|
|
<P>Then add the following lines:</P>
|
|
|
|
<PRE># Send out subscription e-mails at 01:00 every day
|
|
0 1 * * * <i>[dspace]</i>/bin/sub-daily
|
|
# Run the media filter at 02:00 every day
|
|
0 2 * * * <i>[dspace]</i>/bin/filter-media
|
|
# Run the checksum checker at 03:00
|
|
0 3 * * * <i>[dspace]</i>/bin/checker -lp
|
|
# Mail the results to the sysadmin at 04:00
|
|
0 4 * * * <i>[dspace]</i>/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 indices and clears out any deleted data. Become the <code>postgres</code> UNIX user, run <code>crontab -e</code> and add (for example):
|
|
|
|
<pre># Clean up the database nightly at 4.20am
|
|
20 4 * * * vacuumdb --analyze dspace > /dev/null 2>&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># Run stat analyses
|
|
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>-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>
|
|
|
|
<p>Note that <a href="http://www.perl.com/download.csp">Perl</a> needs to be installed in order to run the statistical reports.</p>
|
|
|
|
<P>For information on customising the output of this see <A HREF="configure.html#statistics">configuring system statistical reports</A>.</P>
|
|
|
|
<h3>Multilingual Installation</h3>
|
|
In order to deploy a multilingual version of DSpace you have to configure two parameters in <code><i>[dspace]</i>/config/dspace.cfg:</code><br />
|
|
<code>default.locale</code>, e. g. default.locale = en<br />
|
|
<code>webui.supported locales</code>, e. g. webui.supported.locales = en, de<br />
|
|
The Locales might have the form country, country_language, country_language_variant.<br />
|
|
Accoding to the languages you wish to support, you have to make sure, that all the i18n related files are available
|
|
see the <a href="configure.html#multilingualui">Multilingual User Interface</a> section in the configuration documentation.
|
|
|
|
<H3><A NAME="https">DSpace over HTTPS</a></H3>
|
|
|
|
<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>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>
|
|
The solution is to use <em>HTTPS</em> (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>
|
|
The following sections show how to set up the most commonly-used Java Servlet containers to support HTTP over SSL.
|
|
|
|
<h4>To enable the HTTPS support in Tomcat 5.0:</h4>
|
|
|
|
<ol><li><b>For Production use:</b> 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>
|
|
In the examples below, <code>$CATALINA_BASE</code> is the directory
|
|
under which your Tomcat is installed.
|
|
<ol>
|
|
<li><p>Create a Java keystore for your server with the password
|
|
<code>changeit</code>, and install your server certificate
|
|
under the alias <code>"tomcat"</code>.
|
|
This assumes the certificate was put in the file <code>server.pem</code>:</p>
|
|
<pre> $JAVA_HOME/bin/keytool -import -noprompt -v -storepass changeit -keystore $CATALINA_BASE/conf/keystore -alias tomcat -file myserver.pem</pre></li>
|
|
|
|
<LI><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>ca.pem</code>:</p>
|
|
<pre> $JAVA_HOME/bin/keytool -import -noprompt -storepass changeit -trustcacerts -keystore $CATALINA_BASE/conf/keystore -alias ServerCA -file ca.pem</pre>
|
|
</LI>
|
|
|
|
<li><p>Optional -- ONLY if you need to accept client certificates
|
|
for the X.509 certificate stackable authentication module
|
|
See the
|
|
<A HREF="configure.html#authenticate">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>client1.pem</code>:</p>
|
|
<pre> $JAVA_HOME/bin/keytool -import -noprompt -storepass changeit -trustcacerts -keystore $CATALINA_BASE/conf/keystore -alias client1 -file client1.pem</pre>
|
|
</LI>
|
|
|
|
<LI><p>Now add another Connector tag to your <code>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>
|
|
<Connector port="8443"
|
|
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
|
|
enableLookups="false" disableUploadTimeout="true"
|
|
acceptCount="100" debug="0"
|
|
<b>scheme="https"
|
|
secure="true"
|
|
sslProtocol="TLS"
|
|
keystoreFile="conf/keystore"
|
|
keystorePass="changeit"
|
|
clientAuth="true" </b><i>- ONLY if using client X.509 certs for authentication!</i><b>
|
|
truststoreFile="conf/keystore"
|
|
trustedstorePass="changeit"</b> /></pre>
|
|
Also, check that the default Connector is set up to redirect
|
|
"secure" requests to the same port as your SSL connector, e.g.:
|
|
<pre><Connector port="8080"
|
|
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
|
|
enableLookups="false" <b>redirectPort="8443"</b>
|
|
acceptCount="100" debug="0" /></pre>
|
|
|
|
</LI>
|
|
|
|
</OL>
|
|
|
|
<p><li><b>Quick-and-dirty Procedure for Testing:</b><br>
|
|
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>
|
|
In the examples below, <code>$CATALINA_BASE</code> is the directory
|
|
under which your Tomcat is installed.
|
|
<ol>
|
|
<li><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):
|
|
<ul>
|
|
<li><p>Create a new key pair under the alias name <code>"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:
|
|
<pre>
|
|
$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><p>Then, create a <em>CSR</em> (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>tomcat.csr</code>
|
|
<pre>
|
|
$JAVA_HOME/bin/keytool -keystore $CATALINA_BASE/conf/keystore -storepass changeit \
|
|
-certreq -alias tomcat -v -file tomcat.csr</pre>
|
|
|
|
<li><p>Before importing the signed certificate, you must have
|
|
the CA's certificate in your keystore as a <em>trusted certificate</em>.
|
|
Get their certificate, and import it with a command like
|
|
this (for the example <code>mitCA.pem</code>):<pre>
|
|
$JAVA_HOME/bin/keytool -keystore $CATALINA_BASE/conf/keystore -storepass changeit \
|
|
-import -alias mitCA -trustcacerts -file mitCA.pem</pre>
|
|
|
|
<li><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>signed-cert.pem</code>)<pre>
|
|
$JAVA_HOME/bin/keytool -keystore $CATALINA_BASE/conf/keystore -storepass changeit \
|
|
-import -alias tomcat -trustcacerts -file signed-cert.pem</pre>
|
|
|
|
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.
|
|
</ul>
|
|
</li>
|
|
<LI><p>Create a Java keystore for your server with the password
|
|
<code>changeit</code>, and install your server certificate
|
|
under the alias <code>"tomcat"</code>.
|
|
This assumes the certificate was put in the file <code>server.pem</code>:</p>
|
|
<pre> $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>test-dspace.myuni.edu</code>).
|
|
The other questions are not important.</p></li>
|
|
|
|
<li><p>Optional -- ONLY if you need to accept client certificates
|
|
for the X.509 certificate stackable authentication module
|
|
See the
|
|
<A HREF="configure.html#authenticate">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>client1.pem</code>:</p>
|
|
<pre> $JAVA_HOME/bin/keytool -import -noprompt -storepass changeit -trustcacerts -keystore $CATALINA_BASE/conf/keystore -alias client1 -file client1.pem</pre>
|
|
</LI>
|
|
|
|
<li><p>Follow the procedure in the section above to
|
|
add another Connector tag, for the HTTPS port, to your <code>server.xml</code> file.</p></li>
|
|
</ol>
|
|
</ol>
|
|
|
|
<h4>To use SSL on Apache HTTPD with mod_jk:</h4>
|
|
If you choose <a href="http://httpd.apache.org/">Apache HTTPD</a>
|
|
as your primary HTTP server, you can have it forward requests to
|
|
the <a href="http://tomcat.apache.org/">Tomcat servlet container</a> via
|
|
<a href="http://tomcat.apache.org/connectors-doc/">Apache
|
|
Jakarta Tomcat Connector</a>. This can be configured to work
|
|
over SSL as well.
|
|
<p>
|
|
First, you must configure Apache for SSL; for Apache 2.0
|
|
see <a href="http://httpd.apache.org/docs/2.0/ssl/">
|
|
Apache SSL/TLS Encryption</a> for information about using
|
|
<a href="http://httpd.apache.org/docs/2.0/mod/mod_ssl.html">mod_ssl</a>.
|
|
<p>
|
|
<em><b>If you are using X.509 Client Certificates for authentication:</b></em>
|
|
add these configuration options to the appropriate <i>httpd</i>
|
|
configuration file, e.g. <code>ssl.conf</code>, and be sure they
|
|
are in force for the virtual host and namespace locations dedicated to DSpace:
|
|
<pre>
|
|
## SSLVerifyClient can be "optional" or "require"
|
|
SSLVerifyClient optional
|
|
SSLVerifyDepth 10
|
|
SSLCACertificateFile <i>path-to-your-client-CA-certificate</i>
|
|
SSLOptions StdEnvVars ExportCertData
|
|
</pre>
|
|
<p>
|
|
Now consult the
|
|
<a href="http://tomcat.apache.org/connectors-doc/">Apache
|
|
Jakarta Tomcat Connector</a> documentation to configure the
|
|
<code>mod_jk</code> (note: <b>NOT</b> <code>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><strong>To use SSL on Apache HTTPD with mod_webapp</strong> consult the DSpace 1.3.2 documentation. Apache have deprecated the <code>mod_webapp</code> connector and recommend using <code>mod_jk</code>.</p>
|
|
|
|
<p><strong>To use Jetty's HTTPS support</strong> consult the documentation for the relevant tool.</p>
|
|
|
|
|
|
<H3><A NAME="handles">The Handle Server</A></H3>
|
|
|
|
<P>First a few facts to clear up some common misconceptions:</P>
|
|
|
|
<UL>
|
|
<LI><P>You don't <strong>have</strong> 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><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>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>
|
|
|
|
<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 HREF="http://www.handle.net/">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>
|
|
|
|
<P>The Handle server code is included with the DSpace code in
|
|
<code><i>[dspace-source]</i>/lib/handle.jar</code>. <strong>Note:</strong> The latest version of the <code>handle.jar</code> file is not included in the release due to licensing conditions changing between the provided version and later versions. It is recommended you read the <a href="http://www.handle.net/upgrade_6-2_DSpace.html">new license conditions</a> and decide whether you wish to update your installation's <code>handle.jar</code>. If you decide to update, you should replace the existing <code>handle.jar</code> in <i>[dspace-source]</i>/lib with the new version and rebuild your war files.</p>
|
|
<p>A script exists to create a simple Handle configuration - simply run <code><i>[dspace]</i>/bin/make-handle-config</code> after you've set the appropriate parameters in <code>dspace.cfg</code>. You can also create a Handle configuration directly by following the <A HREF="http://www.handle.net/hs_manual_18jan02/server_manual_2.html">installation instructions on handle.net</A>, but with these changes:</P>
|
|
|
|
<UL>
|
|
<LI>Instead of running:
|
|
<PRE>java -cp /hs/bin/handle.jar net.handle.server.SimpleSetup /hs/svr_1</pre>
|
|
as directed in the <A HREF="http://hdl.handle.net/4263537/4093">Handle Server Administration Guide</A>, you should run
|
|
<pre><i>[dspace]</i>/bin/dsrun net.handle.server.SimpleSetup <i>[dspace]</i>/handle-server</pre>
|
|
ensuring that <code><i>[dspace]</i>/handle-server</code> matches whatever you have in <code>dspace.cfg</code> for the <code>handle.dir</code> property.</LI>
|
|
|
|
<LI>Edit the resulting <code><i>[dspace]</i>/handle-server/config.dct</code> file to include the following lines in the <code>"server_config"</code> clause:
|
|
|
|
<pre>"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>
|
|
</UL>
|
|
|
|
<P>Whichever approach you take, start the Handle server with <code><i>[dspace]</i>/bin/start-handle-server</code>, as the DSpace user. Once the configuration file has been generated, you will need to go to <a href="http://hdl.handle.net/4263537/5014">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>
|
|
|
|
<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>
|
|
|
|
<p>If you need to update the handle prefix on items created before the CNRI registration process you can run the <code><i>[dspace]</i>/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>
|
|
|
|
<p><code><i>[dspace]</i>/bin/update-handle-prefix 123456789 1303</code></p>
|
|
|
|
<p>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>
|
|
|
|
<h3><a NAME="sitemaps">Google and HTML sitemaps</a></h3>
|
|
|
|
<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>[dspace]/bin/generate-sitemaps</code> This creates the sitemaps in <code>[dspace]/sitemaps/</code></p>
|
|
|
|
<p>The sitemaps can be accessed from the following URLs:
|
|
|
|
<ul>
|
|
<li>http://dspace.example.com/dspace/sitemap - Index sitemap</li>
|
|
<li>http://dspace.example.com/dspace/sitemap?map=0 - First list of items (up to 50,000)</li>
|
|
<li>http://dspace.example.com/dspace/sitemap?map=n - Subsequent lists of items (e.g. 50,0001 to 100,000) etc...</li>
|
|
</ul>
|
|
|
|
HTML sitemaps follow the same procedure:
|
|
|
|
<ul>
|
|
<li>http://dspace.example.com/dspace/htmlmap - Index sitemap</li>
|
|
<li>etc...</li>
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
<p>When running <code>[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>/dspace/sitemap</code>) with Google at <a href="http://www.google.com/webmasters/sitemaps/">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>http.proxy.host</code> and <code>http.proxy.port</code> in <code>[dspace]/config/dspace.cfg</code></p>
|
|
|
|
<p>The URL for pinging Google, and in future, other search engines, is configured in <code>[dspace]/config/dspace.cfg</code> using the <code>sitemap.engineurls</code> setting where you can provide a comma-separated list of URLs to 'ping'.
|
|
|
|
<p>You can generate the sitemaps automatically every day using an additional cron job:</p>
|
|
|
|
<pre># Generate sitemaps<br />0 6 * * * [dspace]/bin/generate-sitemaps
|
|
</pre>
|
|
|
|
<h2><a name="windows">Windows Installation</a></h2>
|
|
|
|
<h3>Pre-requisite Software</h3>
|
|
|
|
<p>You'll need to install this pre-requisite software:
|
|
|
|
<ul>
|
|
<li><p><a href="http://java.sun.com/">Java SDK 1.5</a> or later (standard SDK is fine, you don't need J2EE)</p></li>
|
|
<li><p><a href="http://www.postgresql.org/ftp/">PostgreSQL 8.x for Windows</a>. This comes with an installer application now, so Cygwin is no longer required. Make sure the ODBC + JDBC options are selected, as well as the pgAdmin III tool<p></li>
|
|
<li><p><a href="http://ant.apache.org/">Apache Ant 1.6.x</a>. Unzip the package in <code>C:\</code> and add <code>C:\apache-ant-1.6.2\bin</code> to the <code>PATH</code> environment variable. For Ant to work properly, you should ensure that <code>JAVA_HOME</code> is set.</p></li>
|
|
<li><p><a href="http://tomcat.apache.org/">Jakarta Tomcat 5.x+<p></a>
|
|
</ul></p>
|
|
|
|
<h3>Installation Steps</h3>
|
|
|
|
<p><ol>
|
|
<li><p>Download the DSpace source from <a href="http://sourceforge.net/projects/dspace">SourceForge</a> and untar it (<a href="http://www.winzip.com/">WinZip</a> will do this)</p></li>
|
|
<li><p>Copy the PostgreSQL JDBC driver across to the DSpace source tree. The drivers will be in <code>C:\Program Files\PostgreSQL\8.x\jdbc\</code>. The <code>postgresql-8.x-yyy.jdbc2.jar</code> is the jar file you need. Copy it to <code>[dspace-source]/lib</code>.</p></li>
|
|
<li><p>Ensure the PostgreSQL service is running, and then run pgAdmin III (Start -> PostgreSQL 8.0 -> pgAdmin III). Connect to the local database as the postgres user and:
|
|
<ul>
|
|
<li>Create a 'Login Role' (user) called <code>dspace</code> with the password <code>dspace</code></li>
|
|
<li>Create a database called <code>dspace</code> owned by the user <code>dspace</code>, with UTF-8 encoding
|
|
</ul></p></li>
|
|
<li><p>Update paths in <code>[dspace-source]\config\dspace.cfg</code>. <strong>Note:</strong> Use forward slashes / for path separators, though you can still use drive letters, e.g.:
|
|
<p><code>dspace.dir = C:/DSpace</code><p>
|
|
Make sure you change all of the parameters with file paths to suit, specifically:
|
|
<p><pre>
|
|
dspace.dir
|
|
config.template.log4j.properties
|
|
config.template.log4j-handle-plugin.properties
|
|
config.template.oaicat.properties
|
|
assetstore.dir
|
|
history.dir
|
|
log.dir
|
|
upload.temp.dir
|
|
report.dir
|
|
handle.dir</pre></p></p>
|
|
</li>
|
|
<li><p>Create the directory for the DSpace installation (e.g. <code>C:\DSpace</code>)</p></li>
|
|
<li><p>Run:<p><code>ant fresh_install</code></p></p></li>
|
|
<li><p>Create an administrator account, e.g. assuming <code>C:\dspace</code> is where your DSpace installation is:<p><code>C:\dspace\bin\dsrun org.dspace.administer.CreateAdministrator</code></p>
|
|
<p>and enter the required information</p></p></li>
|
|
<li><p>Copy the <code>.war</code> Web application files from <code>[dspace-source]\build</code> to Tomcat's webapps dir, which should be somewhere like <code>C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps</code></p></li>
|
|
<li><p>Start the Tomcat service</p></li>
|
|
<li><p>Browse <code>http://localhost:8080/dspace</code>. You should see the DSpace home page</p></li>
|
|
</ol></p>
|
|
|
|
|
|
<H2><A NAME="checking">Checking Your Installation</A></H2>
|
|
<p>TODO</p>
|
|
|
|
<H2><A NAME="knownbugs">Known Bugs</A></H2>
|
|
|
|
<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>KNOWN_BUGS</code> file in the source package.</P>
|
|
|
|
<P>Please see the <A HREF="http://sourceforge.net/tracker/?atid=119984&group_id=19984&func=browse">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>
|
|
|
|
|
|
<H2><A NAME="problems">Common Problems</A></H2>
|
|
|
|
<P>In an ideal world everyone would follow the above steps and have a fully functioning DSpace. Of couse, 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>
|
|
|
|
<DL>
|
|
<DT>Database errors occur when you run <code>ant fresh_install</code></DT>
|
|
|
|
<DD>
|
|
<P>There are two common errors that occur. If your error looks like this--</P>
|
|
|
|
<PRE>[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(AbstractJdbc1Connection.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 HREF="#enabletcpip">(see above)</A>, or perhaps you haven't restarted PostgreSQL after making the change.
|
|
Also, make sure that the <code>db.username</code> and <code>db.password</code> properties are correctly set in
|
|
<code><i>[dspace-source]</i>/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>psql -U dspace -W -h localhost</PRE>
|
|
|
|
<P>Enter the <code>dspace</code> <em>database</em> password, and you should be dropped into the psql tool with a <code>dspace=></code> prompt.</P>
|
|
|
|
<P>Another common error looks like this:</P>
|
|
|
|
<PRE>[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><i>[dspace-source]</i>/lib</code>. <A HREF="#pgdriver">See above.</A></P>
|
|
|
|
|
|
<DT>Tomcat doesn't shut down</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>ps -ef | grep java</PRE>
|
|
|
|
<P>and look for Tomcat's Java processes. If they stay arround after running Tomcat's <code>shutdown.sh</code> script, trying <code>kill</code>ing them (with <code>-9</code> if necessary), then starting Tomcat again.</P></DD>
|
|
|
|
<DT>Database connections don't work, or accessing DSpace takes forever</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>ps -ef | grep postgres</PRE>
|
|
|
|
<P>You might see some processes like this</P>
|
|
|
|
<PRE>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>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>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>kill</code>ing the process, and stopping and restarting Tomcat.</P></DD>
|
|
|
|
<dt>You've made changes to the code or to the JSP's and rebuilt DSpace successfully, but when you run Tomcat
|
|
you don't see any of your changes in DSpace.</dt>
|
|
|
|
<dd><p>After you've rebuilt DSpace and copied <code>dspace.war</code> from your <code><i>[dspace-source]</i>/build</code> directory
|
|
into your <code><i>[tomcat]</i>/webapps</code> directory, you must
|
|
also <strong>delete</strong> the existing <code><i>[tomcat]</i>/webapps/dspace</code> directory <strong>before</strong> re-starting Tomcat. Otherwise
|
|
Tomcat will continue to use the old code.<p></dd>
|
|
|
|
</DL>
|
|
|
|
<HR>
|
|
|
|
<ADDRESS>
|
|
Copyright © 2002-2005 MIT and Hewlett Packard
|
|
</ADDRESS>
|
|
</BODY>
|
|
</HTML>
|