Wednesday, March 8, 2017

Installing DSpace 6.0 on Ubuntu 14.04 LTS

Open terminal and put the command
sudo apt-get update

Install Java on your Ubuntu:
sudo apt-get install openjdk-7-jdk

Install ant on your Ubuntu:
sudo apt-get install ant

Install maven on your Ubuntu:
sudo apt-get install maven

Install Apache Tomcat 7:
sudo apt-get install tasksel

sudo tasksel

Select the following packages tomcat java server only by putting (*)

Add DSpace User to system
useradd -m dspace
https://github.com/DSpace/DSpace/releases/download/dspace-6.0/dspace-6.0-src-release.tar.gz

Install PostgreSQL 9.6 
Add PostgreSQL Apt Repository

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -

Install PostgreSQL

sudo apt-get update
sudo apt-get install postgresql postgresql-contrib

sudo su - postgre
createuser --username=postgres --no-superuser --pwprompt dspace
createdb --username=postgres --owner=dspace --encoding=UNICODE dspace
psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"


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

Install DSpace repository

wget https://github.com/DSpace/DSpace/releases/download/dspace-6.0/dspace-6.0-src-release.tar.gz
tar -zxf dspace-6.0-src-release.tar.gz
cd /dspace-6.0-src-release
mvn -U package

cd dspace/target/dspace-installer 
(if target is not available in /dspace, then try try cd /dsapce/dspace-6.0-src-release/dspace/target/dspace-installer)

sudo ant fresh_install

Create ADMINISTRATOR for DSpace
/dspace/bin/dspace create-administrator

sudo service tomcat7 stop

udo cp -r /dspace/webapps/xmlui/ /var/lib/tomcat7/webapps
sudo cp -r /dspace/webapps/oai/ /var/lib/tomcat7/webapps
sudo cp -r /dspace/webapps/solr/ /var/lib/tomcat7/webapps

Fix Tomcat permissions, and restart the Tomcat server

sudo chown tomcat7:tomcat7 /dspace -R
sudo service tomcat7 start


Test DSpace xmlui  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



Dspace Demo