Friday, December 2, 2022

How to automatically reboot Ubuntu 22.04

 

Schedule reboots in the Ubuntu


launch a terminal

Type sudo su

sudo crontab -e and then press ENTER

Then 

Add the below line 

00 09   *   *   *    /sbin/shutdown -r +5

Press CTRL+X, then Y, then ENTER.

Your ubuntu server automatically restarts at 9:05am daily

Monday, August 29, 2022

Installing Koha 22.05 on Ubuntu 20.04 LTS

sudo apt-get update


sudo apt upgrade


sudo apt clean


sudo apt-get -y install sudo wget gnupg2


echo deb http://debian.koha-community.org/koha oldstable 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 update


sudo apt install -y mariadb-server


sudo mysqladmin -u root password (******)


sudo apt install -y koha-common


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



update INTRAPORT from '80' to 8080


INTRAPORT="8080"


sudo a2enmod rewrite


sudo a2enmod cgi


sudo service apache2 restart


sudo koha-create --create-db library


sudo nano  /etc/apache2/ports.conf


Edit ports.conf & add the the port 8080



Listen 80

Listen 8080



sudo service apache2 restart


sudo a2dissite 000-default


sudo a2enmod deflate


sudo a2ensite library


sudo service apache2 restart



To view the (koha_library) admin user password


sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml;echo


Tuesday, July 12, 2022

Extract .xz files on Linux (ubuntu)

sudo apt update

sudo apt install xz-utils

unxz file.xz

In my case, I have a file koha_library.sql.xz

unxz koha_library.sql.xz

Search text in nano editor in Ubuntu Linux

Edit file in Nano

Press CTRL + W or F6   

Than Enter

Thursday, January 13, 2022

To edit any files with SFTP or FTP with normal user (ubuntu 20.04)

 The following commands are allowed to edit on SFTP/FTP

sudo find /etc/koha/ -type d -exec chmod 777 {} \;

sudo find /etc/koha/  -type f -exec chmod 666 {} \;














Monday, January 10, 2022

Open port on ubuntu 16.04/20.04 LTS

 Open terminal [ctrl+T] and hit 


sudo ufw status

Apache Full                ALLOW       Anywhere
22                         ALLOW       Anywhere
3306                       ALLOW       161.202.20.0/24
3306 on eth1               ALLOW       Anywhere
3306                       ALLOW       Anywhere
Apache Full (v6)           ALLOW       Anywhere (v6)
22 (v6)                    ALLOW       Anywhere (v6)
3306 (v6) on eth1          ALLOW       Anywhere (v6)
3306 (v6)                  ALLOW       Anywhere (v6)
There is no 8080 port in above list
Now allow 8080 port 
sudo ufw allow

How to migrate Linux Dspace to Window 10

Take a backup of Dspace database and folder s Assume the version is same with both OS [I have tested DSpace 6.3] sudo su mkdir dspace_backup...