DSpace 6.3 Installation in Ubuntu 20.04 LTS

1. sudo apt update

2. sudo apt upgrade

3 sudo useradd -m dspace

4 sudo passwd dspace

5 sudo apt install postgresql postgresql-client -y

6 sudo su postgres

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

8 sudo su postgres

9 sudo nano /etc/postgresql/12/main/pg_hba.conf

Add the following line at the bottom of the configuration.

local all dspace md5

Restart PostgreSQL.

10 sudo systemctl restart postgresql

11 sudo systemctl status postgresql

12 sudo apt install openjdk-8-jdk -y

13 sudo update-alternatives --config java

14 sudo apt install ant maven -y

15 sudo apt install git

16 sudo apt update

17 sudo mkdir /dspace

18 sudo chown dspace /dspace

19 sudo mkdir /build

20 sudo chmod -R 777 /build

21 cd /build/

22 wget https://github.com/DSpace/DSpace/releases/download/dspace-6.3/dspace-6.3-src-release.tar.gz

23 sudo tar xzvf dspace*.tar.gz

24 cd dspace-6.3-src-release

25 sudo cp dspace/config/local.cfg.EXAMPLE dspace/config/local.cfg

26 sudo mvn -U package

27 cd dspace/target/dspace-installer/

28 sudo ant fresh_install

29 cd /opt/

30 sudo wget https://downloads.apache.org/tomcat/tomcat-9/v9.0.65/bin/apache-tomcat-9.0.65.tar.gz

31 sudo tar xzvf apache-tomcat-9.0.65.tar.gz

32 sudo mv apache-tomcat-9.0.65 tomcat

33 sudo nano /etc/profile

Add these lines at the bottom, configuration environment variables for Java.

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

export CATALINA_HOME=/opt/tomcat

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

35 sudo nano /etc/init.d/tomcat

Enter the following bash script.

#!/bin/bash

### BEGIN INIT INFO

# Provides: tomcat8

# Required-Start: $network

# Required-Stop: $network

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: Start/Stop Tomcat server

### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

start() {

sh /opt/tomcat/bin/startup.sh

}

stop() {

sh /opt/tomcat/bin/shutdown.sh

}

case $1 in

start|stop) $1;;

restart) stop; start;;

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

esac


Give it executable permissions and set it as service.

36 sudo chmod +x /etc/init.d/tomcat

37 sudo update-rc.d tomcat defaults

38 sudo service tomcat start

39 sudo service tomcat status

40 sudo /dspace/bin/dspace create-administrator

41 sudo rm -rf /build/




Installing DSpace 5.4 on Ubuntu 14.04 LTS and Ubuntu 12.04