Thứ Hai, 19 tháng 10, 2015

Simple Guide to Install Cloudflare in Cpanel Linux Server

Having cloudflare on your own server will improve the stability when running multiple sites within
For such reasons, you will have to learn to install cloudflare in cpanel of your linux server


These following instructions will guide you how to install properly cloudflare onto your linux server
Before going to further installation, make sure you have installed putty program on your computer

1. Open PuttY and login to SSH with it
2. Access cPanel with root via Putty by typing these commands
ssh root@SERVER IP ADDRESS or SERVER NAME
cd /usr/local/cpanel

3. Download cloudflare by typing this following command
curl -k -L https://github.com/cloudflare/CloudFlare-CPanel/tarball/master > cloudflare.tar.gz

4. Extract cloudflare to your server with this command
tar -zxvf cloudflare.tar.gz

Afterwards, you will find an extract Directory which includes UNIQUE ID.
You can see these following formats

cloudflare-CloudFlare-CPanel-d03f3b8
UNIQUE ID is d03f3b8
UNIQUE ID is not cloudflare-CloudFlare-CPanel-d03f3b8

5. Type these command to start installing cloudflare that you have just downloaded

cd cloudflare-CloudFlare-CPanel-UNIQUE ID/cloudflare/
./install_cf HOST_API_KEY mod_cf ‘YOUR_COMPANY_NAME’

For example this tutorial uses ebookwp as company name

So it will be
./install_cf 56yt8x9s987dfy4324bnv mod_cf “ebookwp”

Notes:
HOST_API_KEY = is API which is made by cloudflare
To get api key, you can contact cloudflare or sign up form on their site

6. Now, just wait a while as cloudflare installation is being processed
Once it is getting successfully installed, you will be noticed with this following notification
CloudFlare module installed successfully

7. After having such message, you have already had cloudflare on your server
In order to activate it, you can login to WHM cPanel >> Easy Apache >> Mod Cloudflare > give a check then build till it is done well

8. Then, you can delete remnant files of the installation by typing these following commands
cd ../ ../.
rm -rf cloudflare-CloudFlare-CPanel-UNIQUE ID*

To check cloudflare in your server, you can type these commands
cd /usr/local/cpanel
cat etc/cloudflare.json

You will see this following forms on the whm screen

root@server1 [/usr/local/cpanel]# cat etc/cloudflare.json
{
“host_key”:”32yt5a7b436tuy8974tre -”, (For security purposes, this will not be your host key.)
“host_formal_name”:”ebookwp”,
“host_name”:”api.cloudflare.com”,
“host_uri”:”/host-­gw.html”,
“user_name”:”www.cloudflare.com”,
“user_uri”:”/api_json.html”,
“host_port”:”443”,
“host_prefix”:”cloudflare-­resolve-­to”,
“cp_version”:”1.3.0”

Hopefully, this article will be useful to have cloudflare on your server, so you will be able to run all of your sites with ease and stable

Không có nhận xét nào:

Đăng nhận xét