Monthly Archive: June 2017

letsencrypt 520x245 - Install Let's Encrypt Free SSL | Linux Administration 0

Install Let’s Encrypt Free SSL | Linux Administration

Install Let’s Encrypt Free SSL | Linux Administration Install free let’s encrypt SSL certificate to enhance the security of your website. It is a free certificate authority which to enable HTTPS on your website. Download lets encrypt library. git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt Jump to /opt/letsencrypt directory. cd /opt/letsencrypt/ Turn off the auto updates. —– OPTIONAL ./letsencrypt-auto –no-self-upgrade renew Enter the document root path (example: /var/www/html/) and domain name (example.com) in below...

security 520x245 - Updating Latest Security Patches For Ubuntu | Linux Administration 0

Updating Latest Security Patches For Ubuntu | Linux Administration

Show all upgradeable packages $ apt-get -s dist-upgrade | grep “^Inst” Show security updates only : $ apt-get -s dist-upgrade |grep “^Inst” |grep -i securi  or $ sudo unattended-upgrade –dry-run -d or $ /usr/lib/update-notifier/apt-check -p Install required packages:- $ apt-get install unattended-upgrades 1. The below command will run silently on your system and apply security updates. $ sudo unattended-upgrades 2. Or you can use optin -d with command to show...

shell 199712 640 520x245 - MySQL Database Backup | Bash Scripting 0

MySQL Database Backup | Bash Scripting

MySQL Database Backup | Bash Scripting #!/bin/bash TIMESTAMP=$(date +”%F”) BACKUP_DIR=”/backup/databases/$TIMESTAMP” MYSQL_USER=”username” MYSQL_PASSWORD=”userpass” MYSQL=”$(which mysql)” MYSQLDUMP=”$(which mysqldump)” mkdir -p $BACKUP_DIR find “$BACKUP_DIR” -mtime +3 -type d -exec rm -rf {} \; databases=`$MYSQL -u$MYSQL_USER -p$MYSQL_PASSWORD -e “show databases”| grep -Ev “(database|Database|information_schema|performance_schema|phpmyadmin|mysql)”` for db in $databases; do $MYSQLDUMP -u $MYSQL_USER -p$MYSQL_PASSWORD –databases $db > $BACKUP_DIR/$db.sql done Making the sqlbak.sh file executable. chmod 755 sqlbak.sh Quick explanation of MySQL database backup shell script Shell...