Install DSpace 6.3 on Ubuntu 20.04

 

         



  Installation of prerequisite Applications 

Open  Applications > Accessories > Terminal and execute the following commands. Apply following commands,

sudo su

password 

sudo apt-get update


sudo apt-get upgrade


sudo apt install openjdk-8-jdk


sudo apt install maven


sudo apt install ant

 

Install PostgreSQL

Apply the following commands one by one to install PostgreSQL 13. 

visit the site:-  https://www.postgresql.org/download/linux/ubuntu/

 

The PostgreSQL Apt Repository supports the current LTS versions of Ubuntu:

  • 20.04
  • 18.04
  • 16.04

 

# Create the file repository configuration:

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'


# Import the repository signing key:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -


# Update the package lists:

sudo apt-get update

# Install the latest version of PostgreSQL. 

# If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql':

sudo apt-get -y install postgresql

psql -V

 

Login to PostgreSQL and create the database:


sudo su postgres

createuser --username=postgres --no-superuser --pwprompt dspace


Enter a password for new role: [Enter a password e.g. dspace]

password:- dspace

confirm :- dspace

createdb --username=postgres --owner=dspace --encoding=UNICODE -T template0 dspace

 

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

exit

 

Open the following file;
 
sudo gedit /etc/postgresql/13/main/pg_hba.conf

 

should check the 13 number on the directory it may be 9.6, 10, 11, 12 and13 etc....

*# sudo gedit /etc/postgresql/13/main/pg_hba.conf


 
Add this line to the configuration file at the end:

notepad line_number 93 enter


local all dspace md5


save and close the file

 

Restart PostgreSQL :

sudo /etc/init.d/postgresql restart

 

Create a DSpace user


Apply the following commands one by one,

 

sudo useradd -m dspace


sudo passwd dspace

    [enter a password for the new user dspace]

password:         dspace

confirm password: dspace

 

sudo mkdir /dspace

sudo chown dspace /dspace

 

Create a directory to build Dspace:

 

sudo mkdir /build

sudo chmod -R 777 /build

cd /build

 

Download DSpace into /build directory


Copy-paste following line in the terminal,


 tar -zxf dspace-6.3-src-release.tar.gz



Open following file and remove a piece of lines.


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>




    or 



<!--


<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>


-->


Save and close the file.


 Installation of Dspace

Enter into Dspace package folder and apply following commands one by one.


cd /build/dspace-6.3-src-release


sudo mvn -U package


cd dspace/target/dspace-installer


sudo ant fresh_install


Installation of Tomcat


Download the and extract the Tomcat package,



cd /opt


sudo wget https://apachemirror.wuchna.com/tomcat/tomcat-9/v9.0.48/src/apache-tomcat-9.0.48-src.tar.gz



If the above mentioned link not working, visit Tomcat website and download the package.



sudo tar xvzf apache-tomcat-9.0.48.tar.gz



Rename folder "apache-tomcat-9.0.48" to "tomcat"



sudo mv apache-tomcat-9.0.48 tomcat


Delete the Tomcat package file from /opt folder


sudo rm apache-tomcat-9.0.48.tar.gz


Open the following file, 


sudo gedit /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-8-openjdk-amd64
export CATALINA_HOME=/opt/tomcat


Copy Dspace web apps 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,


sudo gedit /etc/init.d/tomcat


Add following lines in the file,


#!/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



Apply the following commands too;


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


sudo update-rc.d tomcat defaults


Start Tomcat server,


sudo service tomcat start


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


sudo service tomcat start

sudo service tomcat restart

sudo service tomcat stop

sudo service tomcat start


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

Apply following command in a terminal,



sudo /dspace/bin/dspace create-administrator


It will ask to enter the email address for user login.


 Examples given below :-



Enter an email address:                           jisgenix
@localhost

Enter First name:                 jis

Enter surename:                   genix

Enter a password:                 jisgenix123

Press Key :-                                                        Y



Delete the build folder


sudo rm -rf /build



Open DSpace in your browser



DSpace has two interfaces; xmlui and jspui. You can load either one Dspace interface in a

browser.




http://localhost:8080/xmlui


http://localhost:8080/jspui



Reference:

https://wiki.lyrasis.org/display/DSDOC6x/Installing+DSpace

http://dspacegeek.blogspot.com/2019/10/install-dspace-6x-on-ubuntu-16.04.html

Comments

Popular posts from this blog

BASIC LINUX COMMANDS

Header on DSpace JSPUI interface

Install LibreOffice