Linux and Security Blog

Setting up PostGresql Replication with Loadbalancing  with PGPOOL II

Setting up PostGresql Replication with Loadbalancing with PGPOOL II

Installation (on both Master and Slave Nodes): yum install https://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-3.noarch.rpm yum install postgresql95 postgresql95-server postgresql-libs postgresql95-contrib rsync   Initialize the database and configure postgresql /usr/pgsql-9.5/bin/postgresql95-setup initdb cd /var/lib/pgsql/9.5/data cp postgresql.conf postgresql.conf.orig chown postgres postgresql.conf.orig...

Rotate your video with ffmpeg

Rotate your video with ffmpeg

You might run into an issue with the orientation on your videos at times and yeah it is super easy to rotate your video with a free and open source utility ffmpeg. Here is...

Cut Video file with ffmpeg

Cut Video file with ffmpeg

FFMPEG is an open source and really powerful audio/video processor. You can do a lot of different things with ffmpeg. One of which is to cut video. Below are some examples to see how...

Configure postfix to use Sendgrid as default Relay

Configure postfix to use Sendgrid as default Relay

If you would like to configure postfix to use Sendgrid as the mail relay, you can do so by editing the postfix main configuration file. vi /etc/postfix/main.cf And then paste the content below at...

WordPress Admin Security

WordPress Admin Security

Yeah there are a lot of script kiddies out there scanning word press sites and brute forcing word press admin logins. There are ways you can limit access to the wordpress admin panel from...

Touch command tips and tricks

Touch command tips and tricks

Changing modification time using touch: touch -d ‘-4 day’ filename touch -d ‘-4 hour’ filename touch -d "30 days ago" filename Setting Timestamp : touch -t 201606101712 filename

Bash – Convert a comma separated list to any Array

Bash – Convert a comma separated list to any Array

#!/bin/bash IFS="," sampleData="59,100,23,98,50" arr=($sampleData) for i in "${!arr[@]}";do echo Item $i:"${arr[$i]}" done unset IFS echo "Completed"

Random Wake up of Windows Machine from Sleep mode

Random Wake up of Windows Machine from Sleep mode

It happens at times that the windows machine wakes up randomly from sleep mode. Here are some steps you may be able to follow to identify the cause and address the issue : Find...

Installing newer or multiple version of python on Centos

Installing newer or multiple version of python on Centos

I stumbled across this situation where I needed to install python  > 2.7 on Centos. Yum breaks if you upgrade the system python as yum relies on python 2.6 . So the only way...

Postfix Queue Management

Postfix Queue Management

Retry delivery of mail in queue : postqueue -f Flush mail for a domain to primary mail server from Relay server: postqueue -s domain.com Delete all email in queue for a domain: postqueue -p...