Installing DSpace 1.5 on Ubuntu 8.04

From DSpace Wiki

Jump to: navigation, search

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.

  1. 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).
  2. 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.
  3. Install tomcat5.5 package and all associated dependencies
  4. Install sun-java5-jdk or sun-java6-jdk package and all associated dependencies
  5. Install postgresql-8.2 or postgresql-8.3 package and all associated dependencies
  6. Install libpg-java package for the Postgres JDBC driver
  7. Install ant-optional package for regular expression support in build.xml
  8. Install maven2 package for the maven build utility
  9. 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
    Or
    sudo update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java
  10. 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
  11. 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
  12. 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
    
  13. Now perform the following tasks as the dspace user:
    sudo su - dspace
    bash
  14. Using the release package:
    1. 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)
    2. Configure [dspace-src]/dspace/config/dspace.cfg -- check to see if email configuration is required for Ubuntu, currently set to local-only
    3. cd into the [dspace-src]/dspace directory.
    4. 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).

    5. cd into [dspace-src]/dspace/target/dspace-[version]-build.dir/
    6. Initialize the database and install the software:
      ant fresh_install
      
    Remark: If the build fails two things are neccessary to do before a new attempt: 1. Remove the remains of the faild build (execute ant clean), 2. Remove the dspace tables from the database by dropping and recreating it (execute dropdb -U dspace dspace; createdb -U dspace -E UNICODE dspace). Of course the reason for the failing must be cured too.
</li>
  • Create the initial DSpace administrator:
    /dspace/bin/create-administrator
    </li>
  • Append the following lines to /etc/default/tomcat5.5 to set the preferences necessary for dspace:
    TOMCAT5_USER=dspace
    TOMCAT5_SECURITY=no
    
    </li>
  • Modify the Tomcat properties in /etc/tomcat5.5/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, and the dspace.cfg file:
        <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>

  • Start Tomcat:
    sudo /etc/init.d/tomcat5.5 start

    </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

  • Personal tools