DSpace 6.3 with OAI-PMH 2.0 Installation

Yah begitulah

Getting Started

Getting Started

Server Instance

This specification is not for production purpose. Get more scalable instance for production purpose.

Getting Started

Systems Requirement

Software needed to run DSpace

Getting Started

Installation Steps

  1. Update OS machine
  2. Create User
  3. Install Database
  4. Building DSpace
  5. Install Servlet
  6. Create DSpace Admin
  7. Install Solr
  8. Configuring OAI
  9. Testing

Installation

Installation

Update OS

I'm loging in as root user! You may need SUDO for the entire process.

apt update && apt upgrade -y
reboot now
Installation

Create User

In order to make things easy, we need to create new user "dsapce".

useradd -m dspace
passwd dspace
//enter your desire password for dspace user

 

Installation

Installing Database

Install PostgreSQL

apt install postgresql postgresql-client -y

Create user dspace with password dspace in PostgreSQL.

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

Create a database for dspace.

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

Activating the pgcrypto extension.

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

Open the PostgreSQL configuration file pg_hba.conf.

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

Add the following configuration at the very bottom line.

local  all  dspace  md5

Restart PostgreSQL.

systemctl restart postgresql
systemctl status postgresql

 

Installation

Building DSpace

This is a long run step, take a break and get some coffee.

Install OpenJDK 8.

apt install openjdk-8-jdk -y

OPTIONAL: If another version of OpenJDK has been installed previously, change the default java to OpenJDK 8.

update-alternatives --config java 

Install Apache Ant and Apache Maven.

apt install ant maven -y

Create a dspace folder.

mkdir /dspace
chown dspace /dspace

Create a build folder for building DSpace and get inside.

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

Inside /build folder, donwload DSpace v6.3 from their official GitHub

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

Extract dspace*.tar.gz.

tar xzvf dspace*.tar.gz

Move to the dspace-6.3-src-release folder.

cd dspace-6.3-src-release

Copy the local.cfg file.

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

Install Git

apt install git

Compile the DSpace package.

mvn -U package

Make sure your build is successful. ALL success info is in a green text! If there are error, keep trying!

Install DSpace.

cd dspace/target/dspace-installer
ant fresh_install 
Installation

Install Servlet

Time to install Apache Tomcat. We will install version 9.

Inside /opt folder, download Apache Tomcat 9

cd /opt
wget https://downloads.apache.org/tomcat/tomcat-9/v9.0.64/bin/apache-tomcat-9.0.64.tar.gz
tar xzvf apache-tomcat-9.0.64.tar.gz

Rename the apache-tomcat-9.0.64 folder to tomcat.

mv apache-tomcat-9.0.64.tar.gz tomcat

Open the /etc/profile file.

nano /etc/profile

Add configuration environment variables for Java at the very bottom line and save.

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

Copy dspace webapps to tomcat webapps.

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

Create a bash script so that Tomcat can run automatically.

nano /etc/init.d/tomcat 

Enter the following bash script.

#!/bin/bash
### BEGIN INIT INFO
# Provides:        tomcat9
# 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 executable permissions and set it as a service.

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

Run Tomcat server and check the status.

service tomcat start
service tomcat status

 

Installation

Create DSpace Admin

Get your coffee.

Create a DSpace administrator account.

/dspace/bin/dspace create-administrator

Enter your administrator information and comfirm.

 

OPTIONAL: You can delete /build folder now. DSpace already success and run.

Installation

Install Apache Solr

When you need to harvest data with OAI, you need Solr and configure OAI.

Inside /opt folder, create /solr directory.

mkdir /opt/solr

Move to the directory we just created.

cd /opt/solr

Change the directory owner to the dspace user.

chown -R dspace:dspace /opt/solr

Then download Solr 8.11.2 from there with the following command. IMPORTANT!!! > always check version number on official website https://downloads.apache.org/lucene/solr/ to correct the version number.

wget -c https://downloads.apache.org/lucene/solr/8.11.2/solr-8.11.2.tgz

Extract the downloaded archive with this command.

tar xvf solr-8.11.2.tgz

Move the contents to /opt/solr directory.

cp -rf /opt/solr/solr-8.11.2/* /opt/solr

Set Limit Performance

nano /etc/security/limits.conf

add these lines to limits.conf // why root? because i'm using root user. you may set your own user.

root soft nproc 65000
root soft nofile 65000
root hard nproc 65000
root hard nofile 65000

Start solr with the following command.

/opt/solr/bin/solr start

Confirm solr is running with.

/opt/solr/bin/solr status

Configuring OAI

Configuring OAI

Configuring and Indexing OAI from DSpace

Go to Module folder

cd /config/modules/oai.cfg

Configure OAI data and then save.

Restart Tomcat service.

service tomcat restart 

Go to /dspace directory and run this following command.

/dspace/bin/dspace oai import -c

Wait indexing process till finish.

Check OAI status

domaun-url/oai/request?verb=Identify