Page tree
Skip to end of metadata
Go to start of metadata

Installing DSpace 1.4 on Ubuntu 6.06 LTS

Reference documentation: http://www.dspace.org/index.php?option=com_content&task=view&id=152#checker

The Installation on Ubuntu 7.04 is very similar to this procedure.

  1. Add all repositories (free, non-free, universe) (*System -> Administration -> Synaptic Package Manager -> Settings -> Repositories -> Add -> * *) and reload.
  2. Install tomcat5 package and all associated dependencies
  3. Install sun-java5-jdk package and all associated dependencies
  4. Install postgresql-8.1 package and all associated dependencies
  5. Install libpg-java package for the Postgres JDBC driver
  6. Install ant-optional package for regular expression support in build.xml
  7. Make Ubuntu use the Sun JDK:
    sudo update-alternatives --set java /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
  8. 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
  9. Create the PostgreSQL 'dspace' user and the 'dspace' database. The key here is to issue each command using sudo as the Unix 'postgres' user:
    sudo -u postgres createuser -U postgres -d -A -P dspace
    sudo -u dspace createdb -U dspace -E UNICODE dspace
  10. Now perform the following tasks as the dspace user:
    sudo su - dspace
    bash
  11. Download DSpace source (stable) from http://sourceforge.net/projects/dspace in any directory and unpack it. The new DSpace directory is referred to as [dspace-source].
  12. Copy the JDBC driver into the [dspace-src]/lib directory as postgresql.jar:
    cp /usr/share/java/postgresql-jdbc2-8.1.jar [dspace-src]/lib/postgresql.jar
    
  13. Configure [dspace-source]/config/dspace.cfgcheck to see if email configuration is required for Ubuntu, currently set to local-only
  14. cd into the [dspace-source] directory
  15. Build the DSpace binaries:
    ant fresh_install
    Remark: If the build fails two things are neccessary to do before a new attempt: 1. remove the remainings of the faild build (execute ant clean), 2. remove the dspace tables from the database (execute dropdb -U dspace dspace). Of course the reason for the failing must be cured too.
  16. As root, copy the newly built WAR files into the tomcat webapps directory; then ensure they are owned by the dspace user:
    sudo cp [dspace-source]/build/dspace*.war /var/lib/tomcat5/webapps/.
    
  17. Create the initial DSpace administrator:
    sudo -u dspace /dspace/bin/create-administrator
  18. Append the following lines to /etc/default/tomcat5 to set the preferences necessary for dspace:
    TOMCAT5_USER=dspace
    JDK_DIRS="/usr/lib/jvm/java-1.5.0-sun"
    TOMCAT5_SECURITY=no
    
  19. Change ownership of the directories to the dspace user:
    sudo chown -R dspace /var/cache/tomcat5
    sudo chown -R dspace /var/lib/tomcat5
    sudo chown -R dspace /var/log/tomcat5
  20. Modify the Tomcat properties in /etc/tomcat5/server.xml to use UTF-8 encoding. You can also change the port from the non-standard 8180 to 8080 to match the examples in DSpace documentation:
        <Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
                   port="8180" minProcessors="5" maxProcessors="75"
                   enableLookups="true" acceptCount="10" debug="0"
                   connectionTimeout="20000" useURIValidationHack="false" 
                   URIEncoding="UTF-8"/>
  21. Start Tomcat:
    sudo /etc/init.d/tomcat5 start
  22. Open the new URL in your Web browser: http://hostname:8180/dspace (adjust for your hostname and port number, accordingly)