GlusterFS fix faulty bricks

GlusterFS fix faulty bricks

Great tutorial to manage glusterFS : readthedocs if you are getting error like volume add-brick: failed: Incorrect number of bricks supplied 1 with count 2 Then you are trying to add  distribute leg, which requires multiple bricks based on replication setting, try following command gluster vol add-brick <vol-name> <brick1><brick2>

List the SSL/TLS cipher suites a particular website offers

List the SSL/TLS cipher suites a particular website offers

 Command Line Nmap with ssl-enum-ciphers  This will be a very simple and and  faster way to get a list of available ciphers from a network service.  and nmap will provide a strength rating of strong, weak, or unknown for each available cipher. Which will help to determine 

OpenSSH 7.3 on CentOs 6.7

OpenSSH 7.3 on CentOs 6.7

A simple script to upgrade OpneSSH on CentOs 6.7. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters 

List all users crontab entries

List all users crontab entries

for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done

WordPress Multisite Crontab using WP-CLI Raw

WordPress Multisite Crontab using WP-CLI Raw

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters WP_PATH="/var/www/site_path" for SITE_URL in = $(wp 

AWS S3 Sync using Crontab

AWS S3 Sync using Crontab

Install AWS cli #Download cli script curl “https://s3.amazonaws.com/aws-cli/awscli-bundle.zip” -o “awscli-bundle.zip” #unzip unzip awscli-bundle.zip #install ./awscli-bundle/install -b ~/bin/aws Create crontab script file : sync-s3.sh #/bin/bash export AWS_CONFIG_FILE=”/root/.aws/config” #change it as per user export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXHRQ export AWS_SECRET_ACCESS_KEY=XXXXXXXfHyR /usr/local/bin/aws s3 sync /var/www/testsite.com/htdocs/wp-content/uploads s3://my-imagestore/ –acl=public-read –debug Add crontab to 

How to add Swap on ubuntu

How to add Swap on ubuntu

https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04

Sort directory by size in linux terminal

Sort directory by size in linux terminal

The linux “du” is a standard Unix command, used to check the information of disk usage of files and directories on a machine. Following command will sort “du” command result by size. du -hs * | sort -h

Exporting all MySQL user privileges

Exporting all MySQL user privileges

To export all MySQL user privileges run following script. Note : Replace {host_name}, {user_name} and {password} with your values. mysql -h {host_name} -u {user_name} -p{password} -Ne “select distinct concat( \”SHOW GRANTS FOR ‘\”,user,\”‘@’\”,host,\”‘;\” ) from user;” mysql | mysql -h {host_name} -u {user_name} -p{password} | sed 

Add/Update Git Subtree

Add/Update Git Subtree

Recently I am working on WordPress development helper library, I add it as submodule in many of my plugins, but every time during clone i forgot to init and update submodule, and some time during pull code i forgot to update new submodule. So, Finally 

Fix for yum-complete-transaction command not found

Fix for yum-complete-transaction command not found

Following command snippets is fix for issue yum-complete-transaction command not found  wget -c ftp://ftp.muug.mb.ca/mirror/centos/6.5/os/i386/Packages/yum-utils-1.1.30-14.el6.noarch.rpm yum localinstall yum-utils-1.1.30-14.el6.noarch.rpm yum-complete-transaction –cleanup-only