Contribute to the DSpace Development Fund

The newly established DSpace Development Fund supports the development of new features prioritized by DSpace Governance. For a list of planned features see the fund wiki page.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This how-to is an updated version of Peter Deitz's installation guide. The purpose of this guide is to extend the ease and clarity of that instruction set to more modern installs.

This install is based on Ubuntu 14.04.1 LTS Server.

Install Prerequisites

Make sure your sources are up to date before beginning

sudo apt-get update

Install the server stack of Tomcat (web server) and PostgreSQL (database)

sudo apt-get install tasksel
sudo tasksel
  • Select the following packages

    [*] LAMP server
    [*] PostgreSQL database
    [*] Tomcat Java server
    

    *** Don't forget to deselect any defaults!

Install the Compile / Build tools

sudo apt-get install ant maven2

Configure the Prerequisite Software

Create the database user (dspace)

sudo su postgres
createuser -U postgres -d -A -P dspace
exit
  • At this point, you will be asked to enter a password. Make it secure and remember it. 
  • You will also be prompted as to whether or not this user should be able to create other users. This should be no.

Allow the database user (dspace) to connect to the database

sudo vi /etc/postgresql/9.3/main/pg_hba.conf

# Add this line to the configuration: 
	local all dspace md5
# Comment out any lines that have "peer" at the end of them
 
# When done, restart postgresql:
	sudo service postgresql restart

Create the DSpace Database

createdb -U dspace -E UNICODE dspace

Configure Tomcat to know about the DSpace webapps.

sudo vi /etc/tomcat7/server.xml
# Insert the following chunk of text just above the closing </Host>

<!-- Define a new context path for all DSpace web apps -->
<Context path="/xmlui" docBase="/dspace/webapps/xmlui" allowLinking="true"/>
<Context path="/sword" docBase="/dspace/webapps/sword" allowLinking="true"/>
<Context path="/oai"   docBase="/dspace/webapps/oai"   allowLinking="true"/>
<Context path="/jspui" docBase="/dspace/webapps/jspui" allowLinking="true"/>
<Context path="/lni"   docBase="/dspace/webapps/lni"   allowLinking="true"/>
<Context path="/solr"  docBase="/dspace/webapps/solr"  allowLinking="true"/>

Download and Install DSpace

Create the [dspace] directory.

The [dspace] directory is where the running dspace code will reside.

sudo mkdir /dspace

Download the Latest Release

The source release allows you to customize every aspect of DSpace. This step downloads the compressed archive from SourceForge, and unpacks it in your current directory. The dspace-1.x.x-src-release directory is typically referred to as [dspace-src]. 

sudo git clone https://github.com/DSpace/DSpace.git (apt-get install git if you don't already have it)

Compile and Build DSpace

The source release that has been obtained is human readable source code, and must be compiled to machine code for the server to run it. "mvn package" compiles the source code, and "ant" will do all the work necessary to initialize the database with the DSpace schema, and copy all of the compiled machine code to a location where the web server can serve it. This will overwrite any existing installation of DSpace that you may have.

make sure all your dependencies are in order, and you're running maven 3.x. (Check this version with mvn -v)

 
sudo apt-get install openjdk-7-jdk
sudo apt-get install maven
sudo apt-get remove maven2
cd DSpace
mvn package (this step takes a long time)
cd dspace/target/dspace-4.3-SNAPSHOT-build.dir
sudo ant fresh_install

Fix Tomcat permissions, and restart the Tomcat server

This guide follows the convention where the tomcat user will own all of the files in [dspace], so we have to change the owner of the files to tomcat7. Restarting tomcat will deploy the dspace webapps that are now ready to be viewed.

cd /home/dspace (or wherever your bottom most directory for dspace is)
sudo chown tomcat7:tomcat7 /dspace -R
sudo service tomcat7 restart

Test it out in your browser

That is all that is required to install DSpace on Ubuntu. There are two main webapps that provide a similar turn-key repository interface

http://localhost:8080/xmlui

http://localhost:8080/jspui

  • No labels