Bulk marc import using command line
Bulk marc import using command line
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
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.
- Operator: Controls Display Screen or main screen
username : user
password : 123456 - Admin of library: Controls Single library or location admin panel and reports
username : admin
password : library - Master: Controls all the library or location admin panel and reports
username : master
password : superuser
Initial setup to be done.
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?
- 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.
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.
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.
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.
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
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
a. Koha Staff Interface which allows the Library Staff to carry out the library work in the system.
Generally, I use two ports 80 for OPAC and 8000 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.
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.
Install MariaDB server
sudo apt install mariadb-client-10.1
sudo apt install mariadb-server
Assign Root password for MySQL
sudo a2enmod cgi
Find the line Listen 80 in the file. You can use(CTRL+F) command to locate the words in the file.
Listen 8000
sudo service apache2 restart
Enable modules and sites
sudo a2dissite 000-default
sudo a2enmod deflate
sudo a2ensite library
sudo service apache2 restart
Generate the Master Password for Koha Web Installer:
Step 15: Start Koha and finish the Installation with Web Installer:
Once you login with credentials, you will get the Web Installer of Koha. Just opt the default settings and finish the Installation.
References:
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/