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)
Open Terminal and execute following commands. Use [Ctrl+Alt+T] to open Terminal.Step 1: First update and upgrade your Ubuntu server and then Install All Prerequisite Softwares for creating Institutional Repository at your Institute. Use the following command.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openjdk-8-jdk postgresql ant maven
Choose OpenJDK-8 as default by executing this command
sudo update-alternatives --config java
sudo update-alternatives --config java
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 nano /etc/postgresql/12/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 :
/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 and extension pgcrypto:
sudo su dspace
createdb -U dspace -E UNICODE dspace
Then type exit and come to root user
sudo su postgres
Now type the following command to create extension pgcrypto (simply copy & paste the following command in your command line interface)
psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"
Type the following to restart postgres:
/etc/init.d/postgresql restart
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) 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 nano /etc/postgresql/12/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 :
/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 and extension pgcrypto:
sudo su dspace
createdb -U dspace -E UNICODE dspace
Then type exit and come to root user
sudo su postgres
Now type the following command to create extension pgcrypto (simply copy & paste the following command in your command line interface)
psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"
Type the following to restart postgres:
/etc/init.d/postgresql restart
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:
(i) cd /dspace_build
(ii) Then simply Copy and paste (use the mouse only) following line in the terminal.
wget https://github.com/DSpace/DSpace/releases/download/dspace-6.3/dspace-6.3-src-release.tar.gz
(iii) Extract Dspace package by using the following command:
tar -zxf dspace-6.3-src-release.tar.gz
Step 8: Open the following file and comment the code block:
Execute the following command to proceed.
nano /dspace_build/dspace-6.3-src-release/dspace-api/pom.xml
Carefully identify the following block of code and comment it:
Execute the following command to proceed.
nano /dspace_build/dspace-6.3-src-release/dspace-api/pom.xml
Carefully identify the following block of code and comment it:
<!--<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>-->
Step 9: Use the following command to run maven for the installation of Dspace in Installation Directory (/dspace):
(i) cd /dspace_build/dspace-6.3-src-release
(ii)mvn -U package
Step 10: Enter into the Dspace package folder to download packages by issuing the following commands.
(i) cd dspace/target/dspace-installer
(ii)sudo ant fresh_install
Step 11: Installation of Tomcat (one more prerequisite software for DSpace):
Download and extract the Tomcat package. First, change the current directory to /opt Directory.
(i) cd /opt
(ii) wget http://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.45/bin/apache-tomcat-9.0.45.tar.gz
(iii) tar -xvzf apache-tomcat-9.0.45.tar.gz
(iv) Rename folder "apache-tomcat-9.0.45" to "tomcat". Issue following command to do so.
mv apache-tomcat-9.0.45 tomcat
(v) Delete the package file from /opt folder. Issue the following command to do so.
rm apache-tomcat-9.0.45.tar.gz
Step 12: Open following file "/etc/profile" and edit:
(i)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
Then Save and close file.
Step 13: Copy Dspace webapps files (web deployment directory) to Tomcat folder
sudo cp -r /dspace/webapps/* /opt/tomcat/webapps
Step 14: Give permission to tomcat owner, so that tomcat can be executed by dspace user by applying following command:
(i) cd /opt
(ii)chown dspace.dspace tomcat/ -R
Step 15: Start Tomcat server:
Use following command to start tomcat server.
/opt/tomcat/bin/startup.sh
If you want to stop Tomcat server, then use following command:
/opt/tomcat/bin/shutdown.sh
Step 16: 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 17: 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/DSDOC6x/Installing+DSpace
(i) cd /dspace_build/dspace-6.3-src-release
(ii)mvn -U package
Step 10: Enter into the Dspace package folder to download packages by issuing the following commands.
(i) cd dspace/target/dspace-installer
(ii)sudo ant fresh_install
Step 11: Installation of Tomcat (one more prerequisite software for DSpace):
Download and extract the Tomcat package. First, change the current directory to /opt Directory.
(i) cd /opt
(ii) wget http://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.45/bin/apache-tomcat-9.0.45.tar.gz
(iii) tar -xvzf apache-tomcat-9.0.45.tar.gz
(iv) Rename folder "apache-tomcat-9.0.45" to "tomcat". Issue following command to do so.
mv apache-tomcat-9.0.45 tomcat
(v) Delete the package file from /opt folder. Issue the following command to do so.
rm apache-tomcat-9.0.45.tar.gz
Step 12: Open following file "/etc/profile" and edit:
(i)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
Then Save and close file.
Step 13: Copy Dspace webapps files (web deployment directory) to Tomcat folder
sudo cp -r /dspace/webapps/* /opt/tomcat/webapps
Step 14: Give permission to tomcat owner, so that tomcat can be executed by dspace user by applying following command:
(i) cd /opt
(ii)chown dspace.dspace tomcat/ -R
Step 15: Start Tomcat server:
Use following command to start tomcat server.
/opt/tomcat/bin/startup.sh
If you want to stop Tomcat server, then use following command:
/opt/tomcat/bin/shutdown.sh
Step 16: 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 17: 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/DSDOC6x/Installing+DSpace
No comments:
Post a Comment