Installing CloudFlare plugin on cPanel server

This is a free Content Delivery Network (CDN) for your domain. CloudFlare provides a better Internet security services and distributed domain name server services, sitting between the visitor and the Cloudflare user’s hosting provider, acting as a reverse proxy for websites. CloudFlare’s cPanel plugin is also available to manage the CloudFlare account simply through the cPanel itself.

The CloudFlare cPanel plugin installation is very simple and it can be achieved within 5 minutes. This plugin integrates CloudFlare with your cPanel server. Try this and enjoy!!!

Installation Steps

Step 1. SSH to the server in which you need to install CloudFlare plugin.

Step 2. Enter the cPanel basic directory:

cd /usr/local/cpanel

Step 3. Download the tar file to your server.

curl -k -L > cloudflare.tar.gz

Step 4. Untar the file

tar -zxvf cloudflare.tar.gz

Step 5. This will extracts a directory which includes a UNIQUE_ID. The sample format of this will be as follows:


Here w40bbb3 is the UNIQUE_ID.

cd cloudflare-CloudFlare-CPanel-UNIQUE_ID/cloudflare

Step 6. Execute the install script in the following format:

./install_cf API_HOST_KEY mod_cf "Your Company Name"

API_HOST_KEY – You will get this from your CloudFlare panel.
Your Company name – You can give your hostname here.

How to find the API_HOST_KEY?

You can copy the API_HOST_KEY from your CloudFlare account. Please do the following steps to find out the API_HOST_KEY.

Step 1. Log into your CloudFlare account.

Step 2. Go to “My Settings”.

Step 3. Scroll down to “Global API Key”.

Step 4. Click on the “View API Key” button to see your API identifier.

mod_cf is optional. If set, the installer will also try to install mod_cloudflare

That’s it!!! Now, you will be able to see an icon for “CloudFlare” in all your cPanel accounts.

Sample Output for a successful installation:

info [verify_api_spec_files] LoadFile
Register Complete

==> mod_cloudflare: Installed successfully.
==> You may need to customize your EasyApache profile to include Mod CloudFlare

CloudFlare module installed successfully.

In some cases, if you see the output as :

Your HOST_KEY (d892a17e61de5caa062302d54714eb39e4d42) is invalid.

If you see this error, please contact CloudFlare support and ask for valid Host key.

That’s it 🙂

How to install nslookup, dig, host commands in Linux

That can’t do moment we face when we are trying to check if the website is pointing to correct IP and the nameservers which are authoritative for our servers are added correctly at the registrar end. A newly installed machine will not have dig, nslookup, host commands. So we have to manually install them on our servers. All these commands are included in a package called “bind-utils”. But different OS have different package names. I will be doing everything as root user, if you don’t have root privileges then you just have to add sudo before every command.

Installing is pretty straight process by the way.
My ubuntu sources list

[email protected]:~# cat /etc/apt/sources.list
deb lucid main
deb lucid-updates main
deb lucid-security main
deb lucid universe
deb lucid-updates universe

In ubuntu systems it is “dnsutils”


[email protected]:~# apt-get update
[email protected]:~# apt-get install dnsutils -y

In RHEL/Centos it will be bind-utils

[email protected]:~# yum install bind-utils

MySQL script for Performance tuning

What is MySQL performance tuning and what does it mean ?

MySQL has a lot of variables in its configuration. We can edit and set/alter variables to our requirements on our server. We can improve the MySQL performance by varying those values in configuration file. A lot of methods and shell scripts are available for tuning your MySQL server. Here I am explaining the installation and usage of one shell script for tuning the MySQL.

This performance tuning shell script will help you to optimize your MySQL server on a huge traffic cPanel server.

Installation steps

The MySQL tuner has simple installation steps. You can download the latest version from HERE.

Step I : SSH to your server as root user.
Step II : wget the latest version.


Step III : Change the file permission as executable.

chmod 755

Step IV : Execute the script.


See the attached image which has a sample tuner output.

That’s it 🙂