Horizontal Navigation

Monday, 18 December 2017

Installation of Dspace 6.3 on Ubuntu 16.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

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/9.5/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 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: 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 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://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.14/bin/apache-tomcat-9.0.14.tar.gz

(iii) tar -xvzf apache-tomcat-9.0.14.tar.gz

(iv) Rename folder "apache-tomcat-9.0.14" to "tomcat". Issue following command to do so.

mv apache-tomcat-9.0.14 tomcat


(v) Delete the package file from /opt folder. Issue following command to do so.


rm apache-tomcat-9.0.14.tar.gz


Step 11: 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 12: Copy Dspace webapps files (web deployment directory) to Tomcat folder 

sudo cp -r /dspace/webapps/* /opt/tomcat/webapps


Step 13:
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 14: 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 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/DSDOC6x/Installing+DSpace
2. https://listechsavvy.blogspot.in/2016/12/dspace-55-installation-on-ubuntu-1404.html

Thursday, 24 August 2017

Import Koha MARC Records Using Command Line Interface

The following steps must be carefully followed while importing Koha MARC records using Command Line Interface:
Step1: Move your MARC file to the appropriate folder of your Koha Server. Execute the following command: 
mv yourfilename.mrc /usr/share/koha/bin/migration_tools

Step2: Load Environment variables for proper execution of import commands i.e. perl scripts. Execute the following commands carefully: 
 (a)  sudo su  
(b)export PERL5LIB="/usr/share/koha/lib"   
(c)export KOHA_CONF="/etc/koha/sites/library/koha-conf.xml"  

Step3: Go to the appropriate folder where import perl scripts is located. Execute the following command:  
cd /usr/share/koha/bin/migration_tools 

Step4: Finally, execute the following commands as per your requirements:   

Case 1: If you want to place your MARC records in default MARC Bibliographic framework, then execute the following command:
perl bulkmarcimport.pl -file yourfilename.mrc 

Case 2: If you want to place your MARC records in your desired MARC Bibliographic framework, then execute the following command: 

perl bulkmarcimport.pl -framework FRAMEWORK_CODE -file yourfilename.mrc
N.B.: FRAMEWORK_CODE: BKS,SER, CD, TH,etc.

Case 3: If you want to delete all existing records and import new batch of  MARC records, then execute the following command: 

perl bulkmarcimport.pl -d -file yourfilename.mrc

Step5: Rebuild Zebra after import process finish. Execute the following command: 
sudo koha-rebuild-zebra -v -f library 

Tuesday, 20 June 2017

Install Vufind for Library Discovery Service in Ubuntu 16.04

1. Install Apache HTTP Server

The following lines accomplish three things: the first line installs Apache, the second line turns on the URL rewriting module required by VuFind, and the third line restarts the server to activate the newly-installed module.
(i) Install the Apache web server for communication between VuFind and web browsers.
Use following command:
sudo apt-get install apache2
(ii)rewriting module required by VuFind. Use following command:
sudo a2enmod rewrite
(iii)Restart the Apache server to activate the newly-installed module. 
Use following command:
sudo /etc/init.d/apache2 restart

2. Install MySQL

VuFind uses the MySQL database for storing user comments, tags and other information. To install MySQL Server, use the following command:
sudo apt-get install mysql-server
Note: During installation, you will be prompted for a MySQL root password. Remember this password

3. Install PHP

Use the following command:
sudo apt-get install libapache2-mod-php php-mbstring php-pear php php-dev php-gd php-intl php-json php-ldap php-mcrypt php-mysql php-xml

4. Install the Java JDK

Then install JDK (the Java Development Kit) on the server – VuFind's searching back-end and MARC indexing tools rely on Java.
sudo apt-get install default-jdk

5. Download VuFind:

Use the following command:
(i) cd /tmp
(ii) wget http://downloads.sourceforge.net/vufind/vufind-3.1.3.tar.gz?use_mirror=osdn -O vufind-3.1.3.tar.gz
(iv) tar xzvf vufind-3.1.3.tar.gz
(iv) sudo mv vufind-3.1.3 /usr/local/vufind

6. Install VuFind

Use the following command for installing VuFind:
(i) cd /usr/local/vufind
(ii) php install.php

You should also set some permissions to allow Apache to write configuration and cache files to disk:
(iii) sudo chown -R www-data:www-data /usr/local/vufind/local/cache
(iv) sudo chown -R www-data:www-data /usr/local/vufind/local/config
If you plan to use VuFind's command line tools, you also need a separate cache for that:
(v) mkdir /usr/local/vufind/local/cache/cli
(vi) sudo chmod 777 /usr/local/vufind/local/cache/cli

Apache needs to have some extra VuFind settings loaded. Run this command to make Apache aware of VuFind's configuration file:
(i) sudo ln -s /usr/local/vufind/local/httpd-vufind.conf /etc/apache2/conf-enabled/vufind.conf
Apache needs to be restarted so the changes can take effect:
(ii) sudo /etc/init.d/apache2 reload

8. Set Up Environment Variables

Run the following commands in terminal for setting up Environment Variables:
sudo sh -c 'echo export JAVA_HOME=\"/usr/lib/jvm/default-java\" > /etc/profile.d/vufind.sh'
sudo sh -c 'echo export VUFIND_HOME=\"/usr/local/vufind\"  >> /etc/profile.d/vufind.sh'
sudo sh -c 'echo export VUFIND_LOCAL_DIR=\"/usr/local/vufind/local\"  >> /etc/profile.d/vufind.sh'
Then to make it executable/effect, run the following command:
source /etc/profile.d/vufind.sh

9. Final Configuration

(i) Start Sol: To start VuFind's Solr index, use the following command:
cd /usr/local/vufind/
./solr.sh start

(ii) Configure VuFind: 

Open a web browser, and browse to this URL: 

http://localhost/vufind/Install/Home

Then Enjoy Discovery Service using VuFind.

Reference:
https://vufind.org/wiki/installation:ubuntu

Koha Installation in Ubuntu 16.04 Desktop/Server

Installation of Koha on Ubuntu 16.04

Koha can install on Ubuntu/Xubuntu/Kubuntu/Lubuntu. Use the following steps for the installation of Koha on Ubuntu 16.04 LTS
Step 1: Install Ubuntu 16.04 LTS
Open Terminal by: Applications -> Accessories -> Terminal
   
Step 2: Update the system (Ubuntu 16.04 LTS) using 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 Ubuntu.

 (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 latest release of Koha.

sudo apt-get install koha-common
The command will start to download Koha and required packages.
On the way, the process will ask to enter mail of system. Accept the default values.
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 port number of Koha staff client to 8000. Find following line in the file and make changes.     

INTRAPORT="8000"

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

sudo apt-get install mariadb-server 
OR,
sudo apt-get install mysql-server (If installed this, then follow Step 9 to make it useful)

Give a new password for root user while installation.

Step 7: Koha instance creation
 
Apply 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: Change MySQL Configuration file (*If you installed MySQL server):
Insert the following lines of code in your /etc/mysql/mysql.conf.d/mysqld.cnf in the [mysqld] section: 
(i) Use following command to open the file:
sudo gedit /etc/mysql/mysql.conf.d/mysqld.cnf
(ii) Add the following line of code in the [mysqld] section:
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,
NO_ENGINE_SUBSTITUTION
Then save and close the file.
(iv)Restart MySQL Server by using the following command in terminal:
/etc/init.d/mysql restart

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

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

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

Listen 8000

(iii) Restart Apache server by using following command

sudo service apache2 restart

Step 11: Enable modules and sites by using following commands

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


Step 12: Change Koha default master password. Please follow two sub-steps.
 
Sub-step 1: First change the password of koha_library database.
(i) sudo su
         
[enter the Linux Root password]

(ii) mysql -uroot -p  
           [enter the MySQL Root password]

(iii) use mysql;
(iv)  SET PASSWORD FOR 'koha_library'@'localhost' = PASSWORD('koha123');
(v) flush privileges;
(vi) quit;

Sub-step 2: Then put new password in /etc/koha/sites/library/koha-conf.xml file. To open the said file, use the command given below.

(i) sudo gedit /etc/koha/sites/library/koha-conf.xml 
(ii)  Then find the line using ctrl+f and  see by replacing default password with koha123. Please see: " <pass>koha123</pass>"

Step 13: Now start Koha by opening the following links in browser

Start the Apache server by using the following command:
sudo service apache2 restart
 

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

Tuesday, 28 March 2017

Transfer your Old Koha Database to Newly Installed Koha

The following procedure must be followed carefully while transferring your old koha database to your Newly installed Koha.

Step 1: Backup of your Old Koha Database:
Use following command while taking backup of your existing koha Database:

mysqldump -uroot -p koha_library | gzip -9 > koha_library.sql.gz  
Step 2: Install Koha in your new System:
Use following link for fresh Koha installation:
https://listechsavvy.blogspot.in/2016/11/installation-koha-on-ubuntu-1404.html

Step 3: Remove Koha Database from your newly installed Koha System:
Use following command to remove existing koha database: 
(i) sudo su
(ii) mysql -uroot -p 

      (Enter the MySQL Root password) 
(iii) drop database koha_library;
(iv) create database koha_library;
(v) quit;
Step 4: Restoration of Old Koha Database in your new System:

Use the following command for the restoration of old database backup in your new system:

mysql -uroot -p koha_library < koha_library.sql     
(Check name of your source Koha database)


Enter the MySQL root password.

Step 5: Upgrade Database Schema:
Use the following command for upgrading your database schema in your new system:

sudo su
koha-upgrade-schema library


Step 6: Rebuild the Zebra Index:
Use the following command in your terminal:

sudo koha-rebuild-zebra -v -f library