Installation of KOHA and DSpace Open Source Software
Install Koha 21 on Ubuntu 20.04
Update the System
sudo apt update
sudo apt upgrade
Install Mousepad text editor
sudo apt -y install mousepad
Add Koha community repository
echo deb http://debian.koha-community.org/koha oldstable main | sudo tee /etc/apt/sources.list.d/koha.list
wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add –
sudo apt update
OR
echo deb http://debian.koha-community.org/koha stable main | sudo tee /etc/apt/sources.list.d/koha.list
wget -O- https://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -
sudo apt update
sudo apt upgrade
sudo apt clean
sudo apt install koha-common
Install MariaDB server
sudo apt install -y mariadb-server
OR
sudo apt install mysql-server
Assign Root password for MariaDB OR MySQL
sudo mysqladmin -u root password newpass [Replace 'newpass']
Install Koha
sudo apt install -y koha-common
Server configuration
sudo mousepad /etc/koha/koha-sites.conf
Change INTRAPORT="8080"
Koha instance creation
sudo a2enmod rewrite
sudo a2enmod cgi
sudo service apache2 restart
sudo koha-create --create-db library
Add new port
sudo mousepad /etc/apache2/ports.conf
Change Listen 8080
Restart Apache,
sudo service apache2 restart
Enable modules and sites
sudo a2dissite 000-default
sudo a2enmod deflate
sudo a2ensite library
sudo service apache2 restart
Setup the library
sudo service memcached restart
http://127.0.1.1:8080
sudo mousepad /etc/koha/sites/library/koha-conf.xml
************************************************************
Installation procedure of DSpace 6.x on Ubuntu 20.04 LTS
Prerequisite:
Unix like OS
Java - JDK
PostgreSQL
Apache Ant
Apache Tomcat
Apache Maven
DSpace-6.3
Open Applications > Accessories > Terminal and execute the following commands. Apply following commands
OR
Control + Alt + T
Install Mousepad text editor
The mousepad is a lightweight text editor, which requires opening configuration files while the installation process of Koha.
sudo apt -y install mousepad
Update the System
sudo apt update
sudo apt upgrade
sudo apt install mousepad openjdk-8-jdk ant maven
Install PostgreSQL
Apply the following commands one by one to install PostgreSQL 9.6.
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt install postgresql-9.6
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]
createdb --username=postgres --owner=dspace --encoding=UNICODE -T template0 dspace
psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"
exit
Open the following file,
sudo mousepad /etc/postgresql/9.6/main/pg_hba.conf
Add the below line at the end of the configuration file.
local all dspace md5
save and close the file
Restart PostgreSQL:
sudo /etc/init.d/postgresql restart
Create a DSpace user
sudo useradd -m dspace
sudo passwd dspace [enter a password for the new user 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,
wget https://github.com/DSpace/DSpace/releases/download/dspace-6.3/dspace-6.3-src-release.tar.gz
Extracting Dspace package to build directory
tar -zxf dspace-6.3-src-release.tar.gz
Open following file and remove a piece of lines.
sudo mousepad /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>
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 http://mirrors.estointernet.in/apache/tomcat/tomcat-8/v8.5.50/bin/apache-tomcat-8.5.50.tar.gz
If the above mentioned link not working, visit Tomcat website and download the package.
sudo tar xvzf apache-tomcat-8.5.50.tar.gz
Rename folder "apache-tomcat-8.5.50" to "tomcat"
sudo mv apache-tomcat-8.5.50 tomcat
Delete the Tomcat package file from /opt folder
sudo rm apache-tomcat-8.5.50.tar.gz
Open the following file
sudo mousepad /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 mousepad /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
save and close the file.
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 stop
sudo service tomcat restart
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.
Enter an email address (e.g. dspace@localhost).
Enter First name and surename (e.g. dspace)
Enter a password.
Delete the build folder
sudo rm -rf /build
Open browser
DSpace has two interfaces; xmlui and jspui. You can load either one Dspace interface in a browser.
http://localhost:8080/jspui
http://localhost:8080/xmlui