Convert .p12 bundle to server certificate and key files

Seperate Private Key and Certificate file

#Generate certificates bundle file

openssl pkcs12 -nokeys -in server-cert-key-bundle.p12 -out server-ca-cert-bundle.pem

#Generate server key file

openssl pkcs12 -nocerts -nodes -in server-cert-key-bundle.p12 -out server.key

Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM

openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes



Reinstalling MySQL on CentOS/Redhat 6

Some time we faces issues with MySQL installation on Linux machine. If we simply remove MySQL packages and re-install doesn’t fixes the issue, in that case old settings may still exists on server which again affects new install. In that case first uninstall MySQL completely from system and erase all settings of old install. To do the same follow the below settings.

Note: Please do not use below steps if MySQL have any running databases.

Step 1: Uninstall MySQL Packages
First uninstall all the MySQL packages installed on your server

# yum remove mysql mysql-server

Step 2: Romove MySQL Directory
Now we need to remove MySQL data directory from system which by default exists at/var/lib/mysql. If you didn’t find this, It may be changed to some other place, which you can find in my.cnf file with variable datadir. Delete the /var/lib/mysql directory from system but we prefer to rename it to keep a backup of existing files.

# mv /var/lib/mysql /var/lib/mysql_old_backup Continue reading “Reinstalling MySQL on CentOS/Redhat 6” »


Simple failover cluster using UCARP on Ubuntu (Heartbeat Alternative)

In this tutorial, I’ll show you the steps to create a simple failover cluster on Ubuntu using CARP. To make the things meaningful,we’ll create the cluster for Apache service but you can use it for any other service, which relay on IP.


Here is my Setup:

PrimarySrv: This is the main server, where I configured the apache and which act as Master (IP:
SecondarySrv: 2nd Apache Server where I configured the apache exactly like on PrimarySrv (IP : : Virtual IP address,created using Ucarp. Continue reading “Simple failover cluster using UCARP on Ubuntu (Heartbeat Alternative)” »


iExplore- Cool software for managing iPhone 5

Was looking for a PC edition software that can interact and do all things on the iPhone, particularly-

  • Backing up SMS
  • Backing up contacts instead iCloud
  • Accessing Notes
  • Accessing Calendar
  • Accessing Safari bookmarks

Fundamentally above items are enough!

SO let’s go, what I did to achieve it-

Continue reading “iExplore- Cool software for managing iPhone 5” »


Just Love the truth!

ভাইয়া, ওর সাথে আমার পছন্দ–অপছন্দ, ভালো লাগা–না লাগার না অনেক পার্থক্য। কোনো কিছুতেই মেলে না। তাই ব্রেকআপ হয়ে গেল…।…

Posted by Rajib Hasan on Sunday, January 10, 2016


Server Monitoring with Munin and Monit on Ubuntu 14.04 LTS

Our system’s hostname is, and we have a website on it with the document root/var/www/

The following steps have to be performed as root user. To become root user on your server, run this command:

sudo su

Ensure that the system is up to date before you start to install Munin, run:

apt-get update
apt-get upgrade

Apache is used to show the Munin pages, the apache fcgid module is required for the Munin graph zoom feature. I will install apache and the libapache2-mod-fcgid module with apt. Continue reading “Server Monitoring with Munin and Monit on Ubuntu 14.04 LTS” »


Prophet Muhammad’s Last Sermon

Read it first in Bangla while was a school student, likely to be in my religion classes. Thought might be useful to other.

Prophet Muhammad’s final sermon was delivered during the Hajj of the year 632 C.E., the ninth day of Dhul Hijjah, the 12th month of the lunar year, at Arafat, the most blessed day of the year. There were countless Muslims present with the Prophet during his last pilgrimage when he delivered his last Sermon. Continue reading “Prophet Muhammad’s Last Sermon” »


Linux Tune Network Stack (Buffers Size) To Increase Networking Performance

By default the Linux network stack is not configured for high speed large file transfer across WAN links. This is done to save memory resources. You can easily tune Linux network stack by increasing network buffers size for high-speed networks that connect server systems to handle more network packets.

The default maximum Linux TCP buffer sizes are way too small. TCP memory is calculated automatically based on system memory; you can find the actual values by typing the following commands:

$ cat /proc/sys/net/ipv4/tcp_mem

The default and maximum amount for the receive socket memory:

$ cat /proc/sys/net/core/rmem_default
$ cat /proc/sys/net/core/rmem_max

The default and maximum amount for the send socket memory: Continue reading “Linux Tune Network Stack (Buffers Size) To Increase Networking Performance” »


How to Encrypt VNC Traffic with Putty

By default, VNC is not secure protocol.VNC uses encryption during initial connection and login (passwords are not sent in plain-text). Once, we connected then all the VNC data is unencrypted and hacker could sniff our VNC session. It is better (safer) to start VNC server only on and tunnel it over secure SSH tunnel (For this,there are options in Putty).

In this example, I am using CentOS 6.2 as VNC server and VNC Viewer & PuTTY as VNC client on Windows 7.

On CentOS, edit /etc/sysconfig/vncservers file:

sudo nano /etc/sysconfig/vncservers

Add the option “-localhost“: Continue reading “How to Encrypt VNC Traffic with Putty” »


SVN Server on Ubuntu 12.04 LTS with Web Access

To install SVN server, run this command at the command prompt:

sudo apt-get install subversion libapache2-svn apache2

Make the directory where you want to keep the svn repositories and edit the dav_svn.conf file:

sudo mkdir /svn
sudo nano /etc/apache2/mods-enabled/dav_svn.conf

Delete all the data and make it simple like this :-)

<Location /svn>
DAV svn
SVNParentPath /svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user

To create a svn user , use the following command: Continue reading “SVN Server on Ubuntu 12.04 LTS with Web Access” »