Installing DSpace 5.x on Ubuntu 14.04 LTS

[This installation document is obsoleted. Please visit for latest Dspace installation steps.]

Installation of prerequisite applications

Open  Applications > Accessories > Terminal and execute following commands. Text in italics are commands to be executed.

apt-get install leafpad openjdk-7-jdk postgresql ant maven
Create the database user

sudo su postgres
createuser -U postgres -d -A -P dspace

Enter password for new role: [Enter a password e.g. dspace]
Shall the new role be allowed to create more new roles? (y/n) n
[Enter n and press enter button]

Type exit

Allow the database user (dspace) to connect to the database
[If the following command not open, check the postgresql version number and apply in the command]

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

Add this line to the configuration file at the end:  

local all dspace md5

save and close the file

Restart PostgreSQL :

sudo su
/etc/init.d/postgresql restart

Create Dspace user  

sudo useradd -m dspace
sudo passwd dspace
[enter a password for the new user dspace]
sudo mkdir /dspace
sudo chown dspace /dspace

Create the PostgreSQL 'dspace' database

sudo -u dspace createdb -U dspace -E UNICODE dspace  

save and close  the file.
Create Dspace directory

sudo mkdir /build
sudo chmod -R 777 /build
cd /build

Download Dsapce to /build directory
Copy paste following line in the terminal,


You can find latest version from this page and copy the link to download latest version.

Extracting Dspace package

tar -zxf dspace-5.5-src-release.tar.gz
cd /build/dspace-5.5-src-release
mvn -U package 

Enter into Dspace package folder to download packages.

cd dspace/target/dspace-installer
sudo ant fresh_install

Installation of Tomcat

Download the and extract the Tomcat package,

cd /opt


tar xvzf apache-tomcat-8.0.36.tar.gz

Rename folder "apache-tomcat-8.0.36" to "tomcat"

mv apache-tomcat-8.0.36 tomcat

Delete the package file from /opt folder

rm apache-tomcat-8.0.36.tar.gz

Open following file, 

leafpad /etc/profile

Setup environment variables
Environment variables to find JAVA.

Add following lines at the bottom of the file,

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export CATALINA_HOME=/opt/tomcat

Copy Dspace webapps files to Tomcat folder 

sudo cp -r /dspace/webapps/* /opt/tomcat/webapps

Running Tomcat automatically
You can set up to start the Tomcat server start automatically at the time of system turn on.

Open following file in a Terminal,

leafpad  /etc/init.d/tomcat

Add following lines in the file,

# Provides:        tomcat7
# Required-Start:  $network
# Required-Stop:   $network
# Default-Start:   2 3 4 5
# Default-Stop:    0 1 6
# Short-Description: Start/Stop Tomcat server


start() {
 sh /opt/tomcat/bin/

stop() {
 sh /opt/tomcat/bin/

case $1 in
  start|stop) $1;;
  restart) stop; start;;
  *) echo "Run as $0 <start|stop|restart>"; exit 1;;

save and close the file.

Apply following commands too,

chmod +x /etc/init.d/tomcat
update-rc.d tomcat defaults

Start Tomcat server,

service tomcat start

Now you can start and stop Tomcat server using following commands;

service tomcat start
service tomcat stop
service tomcat restart

Make an initial administrator account (an e-person) in DSpace:

Apply following command in a terminal,
/dspace/bin/dspace create-administrator

It will ask to enter email address for user login.
Enter an email address (e.g. dspace@localhost).
Enter First name and surename (e.g. dspace)
Enter a password.

Open Dspace in your browser
You can load either one Dspace interface in a browser.




  1. Is the startup script correct? Looks weird to me.

  2. It is not working for me, Tomcat hangs

  3. Thank you Vimal, This guide is awesome and working absolutely fine. :)

    1. Have you tried the installation steps and Dspace working fine?

  4. Yes, absolutely. I installed DSpace through these steps and its working fine on both interfaces jspui and xmlui. Prior, I was mistaken at export java home on 32 bit Ubuntu. I changed it to i386 instead of amd64 for my 32 bit Ubuntu. Thank you once again.

  5. thanks Vimal Kumar. It works well but have issues with jspui interface. How do I disable jspui since it comes with errors. Thanks

  6. Vimal Kumar sir plz add the how to get the Dspace Backup on ubuntu 12.4 its most important to all so plz add the in our blog...................

  7. thank u sir i have already installed dsapace 5.5 on ubuntu 14.4 and i back of assetstore older version of dspace 4.2 on ubuntu 12.4 so new how ill restore that back to new version

    and one thing for the updating the OS software any problem to dspace....

    1. Sir,
      Please find the restoration steps in following link,

  8. sir

    I installed DSpace 5.x on Ubuntu 14.04 LTS but how to restore the assetstore backup ... i have assetstore backup only plz instruct me as soon as possible waiting for response plz instruct me in details...

    1. Please check

  9. how restore assetstore backup from DSpace 4.2 on Ubuntu 12.4 LTS to DSpace 5.x on Ubuntu 14.04 LTS

    1. Please check following link,