<?xml version="1.0" encoding="utf-8"?>
<html>
Reference documentation: http://www.dspace.org/index.php?option=com_content&task=view&id=152#checker
This is a revision of Installing DSpace 1.4 on Ubuntu 7.04.
<ol>
<li>Ensure all repositories are enabled (free, non-free, universe) (System -> Administration -> Synaptic Package Manager -> Settings -> Repositories, ensure all are checked except Source code) and Reload (button is on main GUI window).</li> Hint: For the next steps, you can use the Search button and look for prefixes of the package names below, like 'tomcat','sun-java', etc. You may select all of the packages and then Apply as one operation.
<li>Install <tt>tomcat5.5</tt> package and all associated dependencies</li>
<li>Install <tt>sun-java5-jdk</tt> or <tt>sun-java6-jdk</tt> package and all associated dependencies</li>
<li>Install <tt>postgresql-8.2</tt> or <tt>postgresql-8.3</tt> package and all associated dependencies</li>
<li>Install <tt>libpg-java</tt> package for the Postgres JDBC driver</li>
<li>Install <tt>ant-optional</tt> package for regular expression support in build.xml</li>
<li>Install <tt>maven2</tt> package for the maven build utility</li>
<li>Make Ubuntu use the Sun JDK (DSpace will not work with the default gcj java), either:
Panel | ||||
---|---|---|---|---|
Or
|
</li>
<li>Create the Unix 'dspace' user, update the passwd, create the directory in which you will install dspace, and ensure that the Unix 'dspace' user has write privileges on that directory:
Code Block |
---|
sudo useradd -m dspace sudo passwd dspace sudo mkdir /dspace sudo chown dspace /dspace |
</li>
<li>Create the PostgreSQL 'dspace' user and the 'dspace' database. Using <tt>sudo</tt> as the Unix 'postgres' user, authorize the 'dspace' user. You will need to select a password, and specify 'n' to the create new roles prompt. Then, as the 'dspace' user, create the database.
Code Block |
---|
sudo -u postgres createuser -U postgres -d -A -P dspace sudo -u dspace createdb -U dspace -E UNICODE dspace |
</li>
<li>Change ownership of the tomcat directories to the dspace user:
Code Block |
---|
sudo chown -R dspace /var/cache/tomcat5.5 sudo chown -R dspace /var/lib/tomcat5.5 sudo chown -R dspace /var/log/tomcat5.5 sudo chown -R dspace /etc/tomcat5.5 |
</li>
<li>Now perform the following tasks as the <tt>dspace</tt> user:
Code Block |
---|
sudo su - dspace bash |
</li>
<li>
Using the release package:
<ol>
<li>Download DSpace release (or src-release) from http://sourceforge.net/projects/dspace in any directory (e.g. <tt>/home/dspace</tt>) and unpack it. The new DSpace directory is referred to as dspace-src. (example: <tt>/home/dspace/dspace-1.5.0-release</tt>)</li>
<li>Configure <tt>dspace-src/dspace/config/dspace.cfg</tt> – check to see if email configuration is required for Ubuntu, currently set to local-only</li>
<li>cd into the <tt>dspace-src/dspace</tt> directory. </li>
<li>Package the install:
Code Block |
---|
mvn package |
Your first run of Maven downloads a lot of dependencies. Be prepared for several minutes of download activity, followed by several minutes of build activity. Note that if you accidentally run Maven using gcj instead of Sun Java, and it fails, you should remove the ~/.m2 directory (<tt>rm -rf /home/dspace/.m2</tt> before proceeding with the correct java).
</li>
<li>cd into dspace-src/dspace/target/dspace-version-build.dir/
<li>Initialize the database and install the software:
Code Block |
---|
ant fresh_install |
</li></ol>
Remark: If the build fails two things are neccessary to do before a new attempt: 1. Remove the remains of the faild build (execute <tt>ant clean</tt>), 2. Remove the dspace tables from the database by dropping and recreating it (execute <tt>dropdb -U dspace dspace</tt>; <tt>createdb -U dspace -E UNICODE dspace</tt>). Of course the reason for the failing must be cured too.</li>
</ol></li>
<li>Create the initial DSpace administrator:
Code Block |
---|
/dspace/bin/create-administrator |
</li>
<li>Append the following lines to <tt>/etc/default/tomcat5.5</tt> to set the preferences necessary for dspace:
Code Block |
---|
TOMCAT5_USER=dspace TOMCAT5_SECURITY=no |
</li>
<li>Modify the Tomcat properties in <tt>/etc/tomcat5.5/server.xml</tt> to use UTF-8 encoding. You can also change the port from the non-standard <tt>8180</tt> to <tt>8080</tt> to match the examples in DSpace documentation, and the dspace.cfg file:
Code Block |
---|
<Connector port="8180" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" /> |
Also in <tt>server.xml</tt> modify the webapps directory to point to /dspace/webapps:
Code Block |
---|
<Host name="localhost" appBase="/dspace/webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> |
</li>
<li>Start Tomcat:
Code Block |
---|
sudo /etc/init.d/tomcat5.5 start |
</li>
<li>Open the new URL in your Web browser: http://hostname:8180/jspui or http://hostname:8180/xmlui (adjust for your hostname and port number, accordingly)
</li>
</ol>
Other Guides
</html>