Installing DSpace 1.5 on Ubuntu 8.04
From DSpace Wiki
Reference documentation: http://www.dspace.org/index.php?option=com_content&task=view&id=152#checker
This is a revision of Installation on Ubuntu 7.04.
- 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). 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.
- Install tomcat5.5 package and all associated dependencies
- Install sun-java5-jdk or sun-java6-jdk package and all associated dependencies
- Install postgresql-8.2 or postgresql-8.3 package and all associated dependencies
- Install libpg-java package for the Postgres JDBC driver
- Install ant-optional package for regular expression support in build.xml
- Install maven2 package for the maven build utility
- Make Ubuntu use the Sun JDK (DSpace will not work with the default gcj java), either:
sudo update-alternatives --set java /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
Orsudo update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java
- 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:
sudo useradd -m dspace sudo passwd dspace sudo mkdir /dspace sudo chown dspace /dspace
- Create the PostgreSQL 'dspace' user and the 'dspace' database. Using sudo 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.
sudo -u postgres createuser -U postgres -d -A -P dspace sudo -u dspace createdb -U dspace -E UNICODE dspace
- Change ownership of the tomcat directories to the dspace user:
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
- Now perform the following tasks as the dspace user:
sudo su - dspace bash
-
Using the release package:
- Download DSpace release (or src-release) from http://sourceforge.net/projects/dspace in any directory (e.g. /home/dspace) and unpack it. The new DSpace directory is referred to as [dspace-src]. (example: /home/dspace/dspace-1.5.0-release)
- Configure [dspace-src]/dspace/config/dspace.cfg -- check to see if email configuration is required for Ubuntu, currently set to local-only
- cd into the [dspace-src]/dspace directory.
- Package the install:
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 (rm -rf /home/dspace/.m2 before proceeding with the correct java).
- cd into [dspace-src]/dspace/target/dspace-[version]-build.dir/
- Initialize the database and install the software:
ant fresh_install
/dspace/bin/create-administrator</li>
TOMCAT5_USER=dspace TOMCAT5_SECURITY=no</li>
<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 server.xml modify the webapps directory to point to /dspace/webapps:
<Host name="localhost" appBase="/dspace/webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</li>
sudo /etc/init.d/tomcat5.5 start
</li>
