Horizontal Navigation

Tuesday, 1 September 2020

Installation of Dspace 6.3 on Ubuntu 20.04

 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 

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

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

Monday, 24 August 2020

Installation of Koha 20.05 on Debian 10 (Buster) Server

Koha can install on Debian 10 (Buster). Use the following steps for the installation of Koha on Debian 10:

Step 1: Install Debian 10 (Buster)
Open the Terminal Window
   
Step 2: Update the system (Debian 10) using the following commands:

(i)  sudo su (Enter Sudo Password)
(ii) apt-get update
(iii)apt-get upgrade

Step 3: Add Koha community repository and Add Koha software channel into Debian 10.

 (i)
echo deb http://debian.koha-community.org/koha stable main | sudo tee /etc/apt/sources.list.d/koha.list
 
(ii) wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -

(iii)apt-get update
Step 4: Install Koha
Use the following command for the installation of the latest release of Koha.

sudo apt-get install koha-common
The command will now start to download Koha and required packages.

Step 5: Server configuration
Now you need to edit the network information like domain name and port numbers. Use the following command

sudo gedit /etc/koha/koha-sites.conf

Here I change the port number of Koha staff client to 8000. Find the following line in the file and make changes.     

INTRAPORT="8000"

Step 6: Install MariaDB server
Apply the following command to install the MariaDB server.

sudo apt-get install mariadb-server 

Assign Root password for MariaDB

If the password asks during the installation process, enter the password in the window. Apply following command, if the password window did not appear during the installation,

sudo mysqladmin -u root password (Press enter now)
Enter password: newpass       [Replace 'newpass']

Step 7: Koha instance creation 
Apply the following commands to create Apache configuration files.

(i)   sudo a2enmod rewrite
(ii)  sudo a2enmod cgi
(iii) sudo service apache2 restart


Step 8: Create a Koha instance with the name library.

sudo koha-create --create-db library


Step 9: Adding ports
I have assigned 8000 port for Koha staff client and 80 for OPAC.
Open the following file and add a new port.

(i) sudo gedit /etc/apache2/ports.conf

(ii) Then copy & paste the following line below Listen 80

Listen 8000

(iii) Restart the Apache server by using the following command

sudo service apache2 restart

Step 10: Enable modules and sites by using the following commands

(i)  sudo a2dissite 000-default
(ii) sudo a2enmod deflate
(iii)sudo a2ensite library
(iv) sudo service apache2 restart


Step 11: Locate Koha default master password using the following command (one time use).
sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml;echo
Note: Password will display in terminal, please copy and paste in login interface of koha staff client.
Step 12: Now start Koha by opening the following links in the browser
Start the Apache server by using the following command:
sudo service apache2 restart
 

Then Open a browser and use the following URL:
http://localhost:8000 (Staff client). Then complete web installer steps.
http://localhost:80 (Online Public Access Catalogue)