Dspace Installation Guide: Step by Step



Dspace 6.4 Installation

Open the terminal and type the following command

 

Update and ugrade

sudo apt-get update sudo apt upgrade

 

Create a dspace user. sudo useradd -m dspace sudo passwd dspace

Install PostgreSQL database

sudo apt install postgresql postgresql-client -y

Create a dspace user with a dspace password in PostgreSQL.

sudo su postgres

createuser -U postgres -d -A -P dspace exit

Create a dspace database .

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

Activate the pgcrypto extension.

sudo su postgres

psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;" exit

Open the PostgreSQL configuration file.

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.

sudo systemctl restart postgresql sudo systemctl status postgresql

Install OpenJDK 8.

sudo apt install openjdk-8-jdk -y

Install ant and maven. sudo apt install ant maven -y

 

Create a dspace folder.

sudo mkdir /dspace

sudo chown dspace /dspace

Create a build folder for building DSpace.

sudo mkdir /build

sudo chmod -R 777 /build cd /build

Download DSpace 6.4 from GitHub

Wget https://github.com/DSpace/DSpace/releases/download/dspace-6.4/dspace-6.4-src- release.tar.gz

Extract dspace

sudo tar xzvf dspace*.tar.gz cd dspace-6.3-src-release

 

Copy the local.cfg file.

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

Remove

sudo gedit /build/dspace-6.3-src-release/dspace-api/pom.xml

Remove the following group of codes. Carefully check the lines in the file.

<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>buildnumber-maven-plugin</artifactId>

<version>1.4</version>

<executions><execution>

<phase>validate</phase>

<goals>

<goal>create</goal>

</goals>

</execution>

</executions>

</plugin>

Compile the DSpace package.

sudo mvn -U package

Install DSpace.

cd dspace/target/dspace-installer sudo ant fresh_install

Install Apache Tomcat

Download and extract Apache Tomcat 9.

cd /opt

sudo wget https://downloads.apache.org/tomcat/tomcat-9/v9.0.76/bin/apache-tomcat- 9.0.76.tar.gz

sudo tar xzvf apache-tomcat-9.0.76.tar.gz

Change the apache-tomcat-9.0.76 folder to tomcat.

sudo mv apache-tomcat-9.0.76 tomcat

Open the file /etc/profile.

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

Copy dspace webapps to tomcat webapps.

sudo cp -r /dspace/webapps/* /opt/tomcat/webapps Create a bash script so that Tomcat can run automatically. 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 a service.

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

sudo service tomcat start

Start

sh /opt/tomcat/bin/startup.sh

Create a DSpace administrator account. sudo /dspace/bin/dspace create-administrator

 

Delete the builds folder.

sudo rm -rf /build

DSpace access test

http://localhost:8080/jspui or http://serverIP:8080/jspui

 

Post a Comment

0 Comments