Tuesday, October 22, 2019

Setting Cron Job for Auto RunningTomcat for DSpace

Open following file in a Terminal (Ctrl+Alt+t)

$ sudo gedit  /etc/init.d/tomcat                               (on Cloud server  $ sudo nano /etc/init.d/tomcat)

Add following lines in the file,

#!/bin/bash
### BEGIN INIT INFO
# Provides:        tomcat9
# 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

Thursday, October 17, 2019

Creating New Users in DSpace

If you have not configured email with DSpace, then you can create User in DSpace using bellow command line:

Open terminal in Ubuntu.

issue the below commands:

/home/dspace/bin/dspace user --add --email youremilID -g FirstName -s LastName --password yourpassword


Thursday, February 21, 2019

How to back up MySQL databases from the command line in Linux

Your Koha on Ubuntu 16.04 is up and running with on that server runs a database (or multiple databases) that must be backed up. 
There are various software options you could install to make that happen, but if you want to keep that server platform down to the bare minimum to avoid possible issues, chances are you'll want to work with the built-in tools to perform the backup. It's a good thing the koha administrator of MySQL thought of that

(here name of the database is koha_library on command you may enter root password or your koha db password)

# sudo mysqldump -p koha_library > /home/koha_library.sql


Friday, February 1, 2019

Installing SubjectPlus 4.2 on Ubuntu 16.04 LTS

SubjetcPlus is a free and open source tool to help you manage several interrelated parts of your library data

sudo apt update

sudo apt install mysql-server

sudo systemctl start mysql.service

then
CREATING USERS AND DATABASES


To create a MySQL database and user, follow these steps: At the command line, log in to MySQL as the root user:

mysql -u root -p

Type the MySQL root password, and then press Enter

CREATE DATABASE subjectplus;

CREATE USER sp@localhost;

SET PASSWORD FOR sp@localhost= PASSWORD("yourpassword");

GRANT ALL  ON `sp`.* TO `sp`@`localhost` IDENTIFIED BY 'yourpassword';

GRANT ALL PRIVILEGES ON subjectplus.* TO sp@localhost IDENTIFIED BY 'password';

FLUSH PRIVILEGES;

SHOW DATABASES;

View All MySQL Databases

To view the database you’ve created simply issue the following command:
exit 

Your result should be similar to this:

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| spdb               |
| mysql              |
| test               |
| tutorial_database  |
+--------------------+
4 rows in set (0.00 sec)


sudo service apache2 restart

sudo service mysql restart

apt-get install unzip

mkdir -p /var/www/html/sp

wget https://github.com/subjectsplus/SubjectsPlus/archive/master.zipunzip -q /var/www/html/sp/master.zip

chown -R www-data.www-data /var/www/html/spchmod -R 755 /var/www/html/sp
URL http://localhost/sp/SubjectsPlus-master/

Wednesday, January 23, 2019

Installing Koha 18.11 LTS on Ubuntu 16.04 LTS

Add a Koha Keys

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 -

sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean

Download and install the latest Koha 18.11

sudo apt-get install koha-common

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

----------koha-sites.conf----------------
 # Apache virtual hosts creation variables
DOMAIN=".myDNSname.org"
INTRAPORT="9000"               # use 9000 for an Koha OPAC.
INTRAPREFIX=""
INTRASUFFIX="-intra"
OPACPORT="9090"                # use 9090 for an Koha Staff Login
OPACPREFIX=""
OPACSUFFIX=""

 # SQL file to load into new instances
DEFAULTSQL=""

 # Zebra global configuration variables
ZEBRA_MARC_FORMAT="marc21"   # or normarc or unimarc.
ZEBRA_LANGUAGE="en"          # match with installation language (e.g. es for Spanish)
BIBLIOS_INDEXING_MODE="dom"
AUTHORITIES_INDEXING_MODE="dom"

 # Memcached global configuration variables
USE_MEMCACHED="no"
MEMCACHED_SERVERS="127.0.0.1:11211"
MEMCACHED_PREFIX="koha_"

-----------------
Install MySql

sudo apt-get install mysql-server
(give password as you wish for mysql root user)


sudo a2enmod rewrite
sudo a2enmod cgi
sudo service apache2 restart

sudo koha-create --create-db library

----------
Setup Default Ports for Koha

sudo nano /etc/apache2/ports.conf

Listen 80
Listen 9090           # koha staff
Listen 9000           # koha OPAC

---------
Enable Modules and Site

sudo a2enmod deflate
sudo a2ensite library
sudo service apache2 restart

------
The username to log in with will be koha_library. and you can get the password from this command

sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml;echo
(Username is Koha_library, pwd is showing in command pormnt)

---------------
The staff client, or administrative page, can be accessed at: http://localhost:9090 & Opac at http://localhost:9000

----------
Upgrade Koha for latest relesase

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install koha-common

----------
Back-up and restore Koha

sudo su
mysqldump -uroot -p koha_library | xz > koha_library.sql

(Enter pwd of your root mysql user)

sudo su
mysql -uroot -p (Enter the MySQL Root password)
drop database koha_library;
create database koha_library;
quit;

--------------
Restore Koha DB
sudo su
mysql -uroot -p koha_library < koha_library.sql (Enter the MySQL Root password)
exit

-------------
Upgrade Schema

sudo service memcached restart
sudo koha-upgrade-schema library
----
Re-build Zebra Index

sudo koha-rebuild-zebra -v -f library

(if error then apply bellow command)

koha-rebuild-zebra -f -a -b -v library















Monday, January 21, 2019

Installing Koha 23.05 on ubuntu

apt update sudo apt-get -y install sudo wget gnupg wget -q -O- https://debian.koha-community.org/koha/gpg.asc | sudo apt-key add - sudo apt...