Bulk marc import using command line

Bulk marc import using command line

Load environmental variables

sudo su
export PERL5LIB="/usr/share/koha/lib"
export KOHA_CONF="/etc/koha/sites/library/koha-conf.xml"


Move marc file to the folder where bulkmarcimport.pl is located.

e.g. Move a marc file from your home folder to following folder,

mv sample.mrc /usr/share/koha/bin/migration_tools

Go to the folder where import script located

cd /usr/share/koha/bin/migration_tools

Execute the following command,

perl bulkmarcimport.pl -file sample.mrc

User can import bibliographic records in a desired MARC Bibliographic Framework (e.g. BKS),

perl bulkmarcimport.pl -framework BKS -file sample.mrc

The following command will delete all existing records and install new batch of marc file.

perl bulkmarcimport.pl -d -file sample.mrc

Rebuild Zebra after import process finish

sudo koha-rebuild-zebra -f -v library

Information courtesy: Koha Users Group

Reference
https://perldoc.koha-community.org/misc/migration_tools/bulkmarcimport.html
http://kohageek.blogspot.com

 

New Username and Password create Dspace

New user account from command line 

Dspace administrator can add new user through command line besides email registration. 

Open Terminal and apply following commands, 

 sudo su /dspace/bin/dspace user --add --email user@gmail.com -g Tom -s User --password userpassword 

 Replace with your email and desired user password. 

Reference 

Dspace Geek

https://wiki.duraspace.org/display/DSDOC5x/Managing+User+Accounts

Display logo on Koha staff client login page

 


Displaying institution logo on Koha staff client is part of beautification. Even though library staff who log in the staff client sees the logo, everybody believes that it enhances the branding. 

A system preference, stafflogininstructions available for this purpose. This feature available since the release of Koha version 18.04. 

How it works

Copy the logo to htdocs

Prepare the logo image and put it in an internal folder or in an external server. You can place the image in the folder, /usr/share/koha/opac/htdocs to save in the Koha server. Apply the following command to copy the logo image from the home folder to htdocs.

sudo cp rie-logo.jpg /usr/share/koha/opac/htdocs

Replace the file name (rie-logo.jpg) match with the logo name with you.

Add image details in stafflogininstructions

Open Koha Staff Client, visit and find Administration > Global System Preference > Staff Interface > StaffLoginInstructions.

Otherwise, find the specific option by using the search feature in Administration > Global System Preferences. Put the term, StaffLoginInstructions in search box and find.

HTML tag to display logo

<center> <img src="http://127.0.1.1/rie-logo.jpg" style="width:45%; height:45%;"> </center>

Change the IP (http://127.0.1.1/rie-logo.jpg) match with yours. Save the settings. Sign out from Koha Staff Client and check the login page.

Reference-Koha Geek

In/Out Management

Steps for manual installation.

PHP Installation is required.

You can install PHP by executing following commands.

sudo apt-get install php -y

sudo apt-get install -y php-{bcmath,bz2,intl,gd,mbstring,mysql,zip}
 && sudo apt-get install libapache2-mod-php -y

How to download Package Files?

You can download the package from following link. And Copy them into Home directory.

Download Link : https://github.com/omkar2403/inout.git

Please rename the folder after extraction to inout. Now we have to copy the inout directory into ‘htdocs’ directory. Open the terminal into Home directory and apply the following commands.

sudo su
sudo mv /home/inout /usr/share/koha/opac/htdocs
cd /usr/share/koha/opac/htdocs
chmod 777 -R inout

Steps for quick database setup.

Open the terminal and apply the following commands.

sudo su
mysql -uroot -p
[Enter MySQL Root password]
create database lib;
grant all privileges on lib.* to 'root'@'localhost' identified by 'mysqlroot';
flush privileges;
Quit;

In above code ‘root’ is the username and ‘mysqlroot’ is the password. Make sure you replace it with your credentials.

Now restore the sample database which is present in the ‘inout/DB’ directory by applying following command in terminal. Open Terminal in ‘inout’ directory.

sudo su 
mysql -uroot -p lib < inout.sql 
[Enter MySQL Root password]

Replace your password in the file ‘dbconn.php’ located in ‘inout/functions’ directory, at the line number 3.
Replace the database name to ‘lib’ at line number 4.

sudo nano /usr/share/koha/opac/htdocs/inout/functions/dbconn.php
The system is ready now.
You can access it at URL given below:
http://localhost/inout/login.php

Steps for GIT Installation.

Note: Skip this if have followed Manual Installation Process. Php should be installed.

Please execute the following command to install GIT.

sudo apt-get update
sudo apt-get install git

Goto the following location and clone the package.

cd /usr/share/koha/opac/htdocs
git clone --recursive https://github.com/omkar2403/inout.git
sudo chmod 777 -R inout/

Setup the database as shown in the Manual Installation.
Replace your password in the file ‘dbconn.php’ located in inout/functions directory, in the line number 3.
Replace the database name to ‘lib’ at line number 5.
The system is ready now.
You can access it at URL given below:
http://localhost/inout/login.php

How to use this Koha plugin?

Login Credentials for In Out Management System.

There are 3 users for in out management system for various operations. Please change passwords after first login.

  1. Operator: Controls Display Screen or main screen
    username : user
    password : 123456
  2. Admin of library: Controls Single library or location admin panel and reports
    username : admin
    password : library
  3. Master: Controls all the library or location admin panel and reports
    username : master
    password : superuser

Initial setup to be done.

Login Screen of In Out Management System
Login Screen of In Out System

At the initial state first login through master login.

  • Select location as master when you login as master each time.
  • After login goto on setup tab located left side.
  • Add college or institution name, library closing time. Default name is In out management system.
  • You need to add location.
  • You can change password of users in user management tab.
  • Then logout from master.

How to use user panel?

User Screen of In Out Management System
User Screen of In Out System
  • login as operator to open the entry screen.
  • Select library name as location while login as operator.
  • This will be displayed at the entrance of the library.
  • Connect the barcode scanner to it. Then it’ll start taking entries.
  • User have to scan their id while entering into library and also when exiting the library.
  • Click on the clock to logout.

Note: You can use keyboard if barcode scanner is not available.

Usage of admin panel.

From another system which is connected to LAN with Koha system you can access the admin panel of each location.

  • login with the admin credentials and select the respected library.
  • It show the reports panel. There are three types of report. Each one can be displayed or exported into excel sheet and PDF files.
Admin Reports in In Out System.
Admin Reports in In Out System.

Features of this Koha Plugin.

There are some additional features added in In out management system version 4.

Now, you can display notices.

This management system introduced a new feature called notice. In this feature librarian can add notices of library in this Koha plugin. To add notice login as master, go to notice tab. Here you can find Head, Body and Footer for notice. Fill this and select location where the notice should be displayed.

Once you add a notice, the default image will replace with notice on the screen. You can disable notice by clicking on notice’s active button. You can add multiple notices for various locations.

Notice Panel in Koha Plugin.
Notice Panel in Koha Plugin.

Complex reports? No!

Reports for In out management system are updated to next level. This system is using Data Tables for the report generation. You can instantly export reports to Excel or PDF format. You can hide columns, search for anything or can apply filter at same time.

Master user and admin user reports are differ from each other. Master can get all location reports at same place where admin can get only respected location reports.

Master Reports in In Out Management System.
Master Reports in In Out Management System.

New way to handle user!

Now you can create multiple users for various locations. Head to user management tab in master user. Here you can create new username, name, password. Also assign them a role that is admin, master or user.

User Management System in In Out System.
User Management System in In Out System.

 


Installation of Koha18.05 on Ubuntu18.04 LTS

Step 1: Open the Terminal: 

To open the terminal, either you can search the Terminal or you can press CTRL+ALT+T together which will open terminal.
Step 2: Login with Root Privilege:s
Once your terminal is ready, you need to login with root privilege and for that run this command in terminal.
sudo su (Hit Enter) It will ask password. Enter the password carefully as it will not be visible.  
(Enter Password)
Step 3: Update the Ubuntu
In order to proceed with Installation of koha, you need to update the system with the following command. 
Run this command in terminal: 
apt-get update



Step 4: Add Koha community repository to the System: 
Now, you need to add the koha channel into Ubuntu
Run the following command one after another in terminal
echo deb http://debian.koha-community.org/koha stable main | sudo tee /etc/apt/sources.list.d/koha.list
wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -


After adding the channel successfully, update the system again with the following command:

apt-get update
Step 5: Installation of Koha:
Once your system is updated, run the following command to install the latest release of koha. 

apt-get install koha-common 
This command will enable the system to start downloading the koha with required files and packages.
During downloading and installing, it may ask you provide some input. Proceed with default values.
Step 7: Important Configuration on koha Server:
Koha Library Management System has two interfaces:
a. Koha Staff Interface which allows the Library Staff to carry out the library work in the system.
b. Koha Online Public Access Catalogue which works as a mirror to display the bibliographical details of the items entered in the system. Generally, Online Public Access Catalogue is for library users to know about details of the items and their personal checkout history as well.
In this you have to configure two different ports for Koha Interface and Koha OPAC:
In order to change the port, open the (koha-sites.conf) file with any editor.
sudo nano /etc/koha/koha-sites.conf

Generally, I use two ports 80 for OPAC and 800
0 for Interface. The reason I do this because, I want to keep the port 80 free so that I can run any other application without any difficulty.
When the file is open I change the port
8000 - Koha OPAC (OPACPORT)
8001 - Koha Interface (INTRAPORT)
Fine the lines in file and make the changes accordingly.

OPACPORT="8000"
INTRAPORT="8001"

Step 8: Installation of MySQL Database:
To store the information, we require a database where we can store the information and use the same accordingly. This database will also enable to take the backup for future use.
Run the following command in terminal to install the MySQL database.
sudo apt-get install mysql-server
           

While installing, system may ask you to provide the password for root user of MySQL. Enter the password and keep the password safely as you will require this when you have to connect the MySQL database for any purpose mostly taking the backup.

or

Install MariaDB server

Here we use MariaDB server instead of MySQL server. Apply the following command to install the MariaDB server.

    sudo apt install mariadb-client-10.1

    sudo apt install mariadb-server

Assign Root password for MySQL

Apply following command,
sudo mysqladmin -u root password 
Enter Password
Step 9: Create the Koha Instance: 
To stand in safer side and avoid error before you create Koha Instance, run the following commands in order one after another.
sudo a2enmod rewrite
sudo a2enmod cgi
Step 10:Restart the Apache Server:
Run this command to restart the Apache Server.
sudo service apache2 stop
sudo service apache2 start
OR
sudo service apache2 restart
Step 11: Create Instance with the name 'library':
To create the same, run this command:
sudo koha-create --create-db library
Step 12: Adding ports:
The ports which you have opted to run the Koha Interface and Koha OPAC, the same ports you will have to configure in Apache Server also.
To make changes, open the following file with any editor.
sudo nano /etc/apache2/ports.conf

Find the line Listen 80 in the file. You can use
(CTRL+F) command to locate the words in the file.
Listen 80
Listen 8000
Listen 8001
Step 13:Now, Restart Apache Web Server,

sudo service apache2 restart
Enable modules and sites

sudo a2dissite 000-default
sudo a2enmod deflate
sudo a2ensite library
Now, Restart Apache Web Server,

sudo service apache2 restart

Generate the Master Password for Koha Web Installer:
Run this command to get the password:
Step 14: Start web installation of Koha
The username to log in with will be koha_library and the password can be located in the file /etc/koha/sites/library/koha-conf.xml
Apply the following command in terminal to see the koha login password,
sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml
You may check the command at-/etc/koha/sites/library/koha-conf.xml



Step 15: Start Koha and finish the Installation with Web Installer: 
Open following links,

http://127.0.1.1:8001 or http://localhost:8001 (Koha Stff client)
http://127.0.1.1:8000 or http://localhost:8000 (Koha Online Public Access Catalogue)

Once you login with credentials, you will get the Web Installer of Koha. Just opt the default settings and finish the Installation.

References:
  1. http://kohageek.blogspot.in/2015/05/install-koha-on-ubuntu-1404.html
  2. http://koha-community.org

Installation of DSpace 6.3 on Ubuntu 20.04 LTS

 Installation of prerequisite applications


·                     Java Development Kit (JDK)

·                     PostgreSQL Database

·                     DSpace Software

·                     Apache Ant (Pure Java Build Tool)

·                     Apache Maven (Apache Build Automation Tool for Java Projects)

·                     Apache Tomcat (Web Server for hosting Dspace)

 

Open Applications > Accessories > Terminal and execute the following commands.

 

 

1.      Log in as Root

 sudo su 

Enter password…..

·                     Update the Ubuntu : apt-get update

·                     Upgrade the Ubuntu : apt-get upgrade

·                     Install OpenJDK 8 : apt-get install openjdk-8-jdk

·           Apache Maven 3.x (Java build tool) and Apache ant : apt-get install ant maven

·                     Relational Database (PostgreSQL) : apt-get install postgresql

2.    Create Dspace user

      useradd -m dspace

      passwd dspace [enter a password for the new user dspace]

      mkdir /dspace

      chown dspace /dspace

  3. Configure Postgresql and create database

- Create the PostgreSQL "dspace" user

Log in to postgresql:

sudo su postgres

Next, we will create a database called “dspace” and database user called “dspace” with password “dspace”. Don’t confuse database user with normal user. Both are different.

createuser -U postgres -d -A -P dspace

Enter password for new role: ## Enter password for the user dsapce

Enter it again: ## Re-enter password

If asked the following:

Shall the new role be allowed to create more new roles? (y/n) y

Answer "y" for yes.

Than type exit and come to root

Open up the /etc/postgresql/12/main/pg_hba.conf file:

nano /etc/postgresql/12/main/pg_hba.conf

Add the following line shown in red color at last of the file.

local all dspace md5

Type the following to restart:

/ETC/INIT.D/POSTGRESQL RESTAR

4.Create the postgreSQl “dspace” database

 Login as:

sudo su dspace

createdb -U dspace -E UNICODE dspace

Than type exit and come to root

sudo su postgres

Now type the following command to create extension pgcrypto

PSQL --USERNAME=POSTGRES DSPACE -C "CREATE EXTENSION PGCRYPTO;"

Type the following to restart postgres:

/ETC/INIT.D/POSTGRESQL RESTART  

NOTE: while deleting or creating the database log in to the concern user, like for dspace user (sudo su dspace) than apply the commands 

exit    

 GO TO ROOT

 

5.Create dspace directory

mkdir /build

chmod -R 777 /build

cd /build

6. Download Dspace to/build directory

You can check latest version of Dspace from here.

Run the command mentioned below at command prompt. (Ensure that Internet is working).

wget https://github.com/DSpace/DSpace/releases/download/dspace-6.3/dspace-6.3-src-release.tar.gz

tar -zxf dspace-6.3-src-release.tar.gz

cd /build/dspace-6.3-src-release

mvn -fn package

(Please note in case of build failure delete the following lines from /build/dspace-6.0-src-release/dspace-api/pom.xml its due to some known Bug)

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

cd dspace/target/dspace-installer

ant fresh_install

7.Inastallation of Tomcat 

Download the and extract the Tomcat package,

cd /opt

sudo wget http://apachemirror.wuchna.com/tomcat/tomcat-9/v9.0.37/bin/apache-tomcat-9.0.37.tar.gz

Or you can visit the Tomcat website and download the latest package.

8. Extract Tomcat package


sudo tar xvzf apache-tomcat-9.0.37.tar.gz

9. Rename folder "apache-tomcat-9.0.37" to "tomcat" and Delete the Tomcat archive file from /opt folder

sudo mv apache-tomcat-9.0.37 tomcat

sudo rm apache-tomcat-9.0.37.tar.gz

Open the following file,

10. Configure Tomcat

sudo nano /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 the following file in a Terminal,

sudo nano  /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

Restart Tomcat server and PostgreSQL database

sudo service tomcat start

sudo service tomcat stop

sudo service tomcat restart

sudo /etc/init.d/postgresql restart

sudo /etc/init.d/tomcat restart

11. 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 the user login.
Enter an email address (e.g. dspace@localhost).
Enter First name and surname (e.g. dspace)
Enter a password.

Open DSpace in your browser
DSpace has two interfaces; xmlui and jspui. You can load either one Dspace interface in a browser.

http://localhost:8080/xmlui
http://localhost:8080/jspui

Reference:- http://kohageek.blogspot.com/

                      http://libtechnophile.blogspot.com/