Step 0: Prerequisite Softwares for Creating Institutional Repository Using DSapce
Must know, what is to be required for creating IR using DSpace:
1. Java Development Kit (JDK)
2. PostgreSQL Database
3. DSpace Software
4. Apache Ant (Pure Java Build Tool)
5. Apache Maven (Apache Build Automation Tool for Java Projects)
6. Apache Tomcat (Web Server for hosting Dspace)
Step 1: First Install All Prerequisite Softwares for creating Institutional Repository at your Institute. Please use the following command.
sudo apt-get install openjdk-7-jdk postgresql ant maven
Step 2: Create the database user. Please use the following command and follow the instructions.
(i) sudo su postgres
(ii)createuser -U postgres -d -A -P dspace
Enter password for new role: [Enter a password e.g. dspace]
Shall the new role be allowed to create more new roles? (y/n) n
[Enter n and press enter button]
Type exit
Step 3: Allow the database user (dspace) to connect to the database
Open the file "pg_hba.conf" by using the following command.
[If the following command not open, check the postgresql version number and apply in the command]
(i) sudo gedit /etc/postgresql/9.3/main/pg_hba.conf
Add this line to the configuration file at the end:
local all dspace md5
save and close the file
(ii) Restart PostgreSQL :
sudo su
/etc/init.d/postgresql restart
Step 4: Create Dspace user and Dspace Installation Directory:
Execute the following commands one by one.
(i) sudo useradd -m dspace
(ii)sudo passwd dspace [enter a password for the new user dspace]
(iii)sudo mkdir /dspace
(iv) sudo chown dspace /dspace
Step 5: Create the PostgreSQL 'dspace' database:
sudo -u dspace createdb -U dspace -E UNICODE dspace
Step 6: Create Dspace Source directory and give permission to it:
sudo mkdir /dspace_build
sudo chmod -R 777 /dspace_build
Step 7: Download Dsapce to /dspace_build directory:
Execute the following command to proceed.
(i) cd /dspace_build
(ii) Then simply Copy and paste (use mouse only) following line in the terminal.
wget https://github.com/DSpace/DSpace/releases/download/dspace-5.6/dspace-5.6-src-release.tar.gz
(iii) Extract Dspace package by using the following command:
tar -zxf dspace-5.6-src-release.tar.gz
Step 8: Use the following command to run maven for the installation of Dspace in Installation Directory (/dspace):
(i) cd /dspace_build/dspace-5.6-src-release
(ii)mvn -U package
Step 9: Enter into Dspace package folder to download packages by issuing following commands.
(i) cd dspace/target/dspace-installer
(ii)sudo ant fresh_install
Step 10: Installation of Tomcat (one more prerequisite software for Dsapce):
Download the and extract the Tomcat package. First change the current directory to /opt Directory.
(i) cd /opt
(ii) wget http://redrockdigimark.com/apachemirror/tomcat/tomcat-8/v8.0.39/bin/apache-tomcat-8.0.39.tar.gz
(iii) tar -xvzf apache-tomcat-8.0.39.tar.gz
(iv) Rename folder "apache-tomcat-8.0.39" to "tomcat". Issue following command to do so.
mv apache-tomcat-8.0.39 tomcat
(v) Delete the package file from /opt folder. Issue following command to do so.
rm apache-tomcat-8.0.39.tar.gz
Step 11: Open following file "/etc/profile" and edit:
(i)gedit /etc/profile
Setup environment variables
Environment variables to find JAVA.
(ii) Add following lines at the bottom of the file
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export CATALINA_HOME=/opt/tomcat
(iii) Copy Dspace webapps files (web deployment directory) to Tomcat folder
sudo cp -r /dspace/webapps/* /opt/tomcat/webapps
Step 12: Add Script to Run Tomcat automatically during booting time:
You can set up to start the Tomcat server start automatically at the time of system turn on.
Open following file in a Terminal and edit:
(i) sudo gedit /etc/init.d/tomcat
Add following lines in the file (Just copy and paste),
#!/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
save and close the file.
Step 13: Give permission to Tomcat by applying following commands:
(i) chmod +x /etc/init.d/tomcat
(ii)update-rc.d tomcat defaults
Step 14: Start Tomcat server
service tomcat start
Now you can start and stop Tomcat server using following commands:
service tomcat start
service tomcat stop
service tomcat restart
Step 15: Make an initial administrator account (an e-person) in DSpace:
Apply following command in a terminal,
/dspace/bin/dspace create-administrator
It will ask to enter email address for user login.
Enter an email address (e.g. dspace@localhost).
Enter First name and surename (e.g. dspace)
Enter a password.
Step 16: Open Dspace in your browser
You can load either one Dspace interface in a browser.
http://localhost:8080/xmlui
http://localhost:8080/jspui
References:
1. https://wiki.duraspace.org/display/DSDOC5x/Installing+DSpace
2. http://linuxhalwa.blogspot.in/2016/01/installing-dspace-5x-on-ubuntu-1404-lts.html
3. https://tomcat.apache.org/download-80.cgi#8.0.39
No comments:
Post a Comment