Thursday, 27 August 2026

Cloud server- Ubuntu 20.04 initializing

Choose a VPS from a genuine provider. For running Koha and Dspace for a medium size library, minimum configuration shall be 

RAM - 2 GB (4 GB is prefereble), SSD- 80 GB

(Approx. amount will be Rs.15000/year)

After purchasing the VPS do the following steps. They will provide us the root user name and password.

I. Open the terminal window of your local machine. Connect to the Server with ssh command.

eg: user@koha:$ ssh root@yourcloudip

II. create a different user with administrative privilege; (It is not advisable to use root user for software installation)

 root@yourcloudip:$ adduser <newuser>

Some details will ask. Enter the details if you wish to give, otherwise skip the questions for default. Enter a strong Password with Uppercase, Special characters and Numerals

root@yourcloudip:$ add user <newuser> sudo 

III. Setting time and location

root@yourcloudip:$ dpkg-reconfigure tzdata

The time zone will ask and select appropriately.

IV. Reboot the system

root@yourcloudip:$ reboot

Again Connect the server from your local machine with ssh command. Instead of using root@yourcloudip Connect with <newuser>@yourcloudip. Provide the newly created password of the user account.

V. Firewall Enabling:

    1. To check whether the firewall is active, run the command

<newuser>@localhost:$ sudo  ufw status verbose

 The system will show firewall is inactive

  2. Then first enable ssh connection

<newuser>@localhost:$ sudo  ufw allow ssh

    3. Then enable ufw

 <newuser>@localhost:$ sudo  ufw enable

    4. Then open http port and https port

<newuser>@localhost:$ sudo  ufw allow http

<newuser>@localhost:$ sudo  ufw allow https

    5.If you want to open port 8080 for running Dspace

   Open 8080 port also

<newuser>@localhost:$ sudo  ufw allow 8080/tcp

 Similarly we can open any port 

    6. To see the open ports

<newuser>@localhost:$ sudo  ufw status numbered

 7.To disable the port

    Find out the number in the above command

 <newuser>@localhost:$ sudo  ufw delete 3

VI. Update and Upgrade Operating system 

<newuser>@localhost:$ sudo apt-get update

<newuser>@localhost:$ sudo apt-get upgrade

 






Saturday, 7 February 2026

Internal Server Error in koha

 Showed Internal server

 Opened the following file to view the error log 

 sudo gedit /var/log/koha/library/plack-error.log

It is showing something like

Error while loading /etc/koha/plack.psgi: Can't load application from file "/usr/share/koha/api/v1/app.pl": Can't open /var/log/koha/library/z3950-error.log (Permission denied) at /usr/share/perl5/Log/Log4perl/Appender/File.pm line 151.  

 

 

 Applied following commands to fix it

sudo chown library-koha:library-koha /var/log/koha/library/z3950-error.log 

 sudo chown -R library-koha:library-koha /var/log/koha/library/
sudo chmod -R 750 /var/log/koha/library/

sudo koha-plack --restart library

 

Now it is OK 

Tuesday, 17 January 2023

Dspace 6.3 Statistics

 Run the following commands in terminal one by one

sudo /dspace/bin/dspace stat-initial

sudo /dspace/bin/dspace stat-monthly

   sudo /dspace/bin/dspace stat-general

   sudo /dspace/bin/dspace stat-report-initial
   sudo /dspace/bin/dspace stat-report-monthly
  sudo /dspace/bin/dspace stat-report-general

Then visit dspace home page, login to your dspace, then click on Statistics tab in Administer page


Monday, 9 January 2023

Reset Password for mariadb 10.4 or Later

 

 Check mysql --version 

MariaDB output mysql Ver 15.1 Distrib 10.4-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 

Stop MariaDB

sudo systemctl stop mariadb  

Configuring MariaDB to Start Without Grant Tables 

sudo systemctl set-environment MYSQLD_OPTS="--skip-grant-tables --skip-networking" 

sudo systemctl start mariadb (ensure it started with "sudo systemctl status mariadb") 

sudo mysql -u root -p 

MariaDB prompt Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 

MariaDB [(none)]> (reload the grant tables by issuing the FLUSH PRIVILEGES command) 

MariaDB [(none)]>FLUSH PRIVILEGES; 

MariaDB [(none)]>SET PASSWORD FOR root@localhost = PASSWORD ('NEWPASSWORD'); 

Output Query OK, 1 row affected (0.00 sec)

Sunday, 6 December 2020

DSpace header customization

How to change the header image in Dspace JSPUI page/Interface



 1. Prepare a header image and place in Dspace folder

Ex-header.jpg 

ex - cp header.jpg /dspace/webapps/jspui/image
   
2. Hide Dspace brand heading
  Open header-default.jsp file using Terminal. Apply following commands


gedit /dspace/webapps/jspui/layout/header-default.jsp

 
 Replace RED portion for header image setting

/header>
<main id="content" role="main">

<div class="container banner">
    <div class="row">
        <div class="col-md-9 brand">
            <h1><fmt:message key="jsp.layout.header-default.brand.heading" /></h1>
            <fmt:message key="jsp.layout.header-default.brand.description" />
        </div>
        <div class="col-md-3"><img class="pull-right" src="<%= request.getContextPath() %>/image/logo.gif" alt="DSpace logo" />
        </div>
    </div>
</div>
<br/>

             <%-- Location bar --%>


Replace

<p align="middle" topmargin="0"><img src="/jspui/image/header.jpg" width=1135"></P>



Save and close the file.

Open following file,

leafpad /opt/tomcat/webapps/jspui/static/css/bootstrap/bootstrap.min.css

Change the width to 100℅ under .col-md-3
Save and close the file.

Minimize the gap between banner image and breadcrumb 

sudo su
leafpad /opt/tomcat/webapps/jspui/static/css/bootstrap/dspace-theme.css

Find the below line;

.banner img {background-color: #FFFFFF;padding:15px;margin:20px;} 

Replace with following line;

.banner img {background-color: #FFFFFF;padding:0 0 10px;}

Save and close the file.

 

 

Friday, 27 November 2020

Canon LBP printers drivers installer for Ubuntu

Script for installing the Linux CAPT Printer Driver for Canon LBP printers on Ubuntu (both 32-bit and 64-bit)

Install

$ wget https://github.com/hieplpvip/canon_printer/raw/master/canon_lbp_setup.sh
$ chmod +x canon_lbp_setup.sh
$ ./canon_lbp_setup.sh 
 
 
 
 
 
 

Original Script

http://help.ubuntu.ru/wiki/canon_capt

Dspace- Backup and Restore

I. Backup
Apply following commands,


sudo su - postgres
pg_dump dspace > dspace.backup

 
The backup will create in /var/lib/postgresql/ 

 

Create backup of asseststore and log


sudo zip -r assetstore.zip /dspace/assetstore
sudo zip -r log.zip /dspace/log

It is advisable to copy the following folders also to dspace folder to restore as previous

1. Solr 2. upload 3. webapps 4. config 5.bin

 

 
II. Restoration

 
Copy the assetstore, log folders, and database backup to home folder.

Extract the assetstore and log folders. 


 

Stop Tomcat server
sudo service tomcat stop
 

Remove assetstore and log folders from the newly installed dspace


sudo rm -rf /dspace/assetstore
sudo rm -rf /dspace/log/

 
Move  old assetstore and log folders to /dspace folder.


sudo mv assetstore /dspace
sudo mv log /dspace

 

Restoration of database

Restart PostgreSQL
sudo systemctl stop postgresql
sudo systemctl start postgresql
 

Delete the existing dspace database and create a new one. Commands for this
sudo -u postgres psql
DROP DATABASE dspace;
CREATE DATABASE dspace;
\quit

 

Restore dspace backup from the home folder

sudo su postgres
psql -f dspace.backup dspace

 

Install pgcrypto postgres extension

psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"
exit

 

Execute the following commands one by one,

sudo /dspace/bin/dspace database info

sudo /dspace/bin/dspace database migrate

sudo /dspace/bin/dspace index-discovery -b

 sudo /dspace/bin/dspace filter-media

 sudo /dspace/bin/dspace index-discovery

 sudo /dspace/bin/dspace index-discovery -o

 

Restart Tomcat
sudo service tomcat start