Author: Vikas Munjal

Nodejs 520x245 - Installing Node.js Over Several Linux distributions | Linux Administration 0

Installing Node.js Over Several Linux distributions | Linux Administration

Debian and Ubuntu-based Linux distributions Also including Linux Mint, Linux Mint Debian Edition (LMDE), elementaryOS, bash on Windows and others. For Node.js 6: curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash – sudo apt-get install -y nodejs Alternatively, for Node.js 8: curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash – sudo apt-get install -y nodejs Optional: install build tools Build tools are used to compile and install native add-ons from npm sudo apt-get install...

business time clock clocks 48770 1 520x245 - Time Synchronization with NTP | System Administration 0

Time Synchronization with NTP | System Administration

Network Time Protocol – System Administration We are going to show you a simple and handy way to setup NTP over single/multiple servers connected to a network for time synchronization. What is NTP? Network Time Protocol (NTP) is a networking protocol for Clock synchronization between computer systems over packet-switched data networks. Basically, a client requests the current time from a server and uses it to set its own clock. Learn...

Amazon s3 Backup 520x245 - Shell Script for backing up data to Amazon s3 1

Shell Script for backing up data to Amazon s3

s3cmd is a command line tool for saving, retrieving, uploading and managing data from Amazon s3. Its capacity to store huge amount of data on nominal charges, Amazon s3 is becoming one of the most suitable choices for storing data remotely. Pre-Requests Install amazon s3 cli on ec2. Create IAM role with s3 Access Configure s3cmd on ec2. Create Amazon s3 bucket for the backup process. Basic Bash Script, can be modified...

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...