Installing cPanel on Linode Server CentOS 7

By | August 29, 2013

Need to setup Linode CentOS 7 for cPanel

How to setup Linode Server running CentOS 7 for cPanel installation..

Linode & cPanel documentation provided excellent documentation, however there was some confusion for me, so I documented my process. I’ve built several Lindoe’s, all using CentOS 6 or CentOS 7 for cPanel installations. I’ve fine tuned my process along with Linode & cPanel’s documentation. It should take roughly half an hour (30 minutes) to complete the following steps with roughly 3.5 hours for cPanel to download and install. Setting up cPanel on Linode Server with CentOS 6.2 or 7 takes roughly 4 hours to set-up.

First you must purchase, build & provision the linode using CentOS 6.2

Total ETA to complete steps: 4.5 hours

  • steps 1-6 = 5 minutes
  • steps 7 = 20 minutes
  • steps 8 = 1 minute
  • steps 9 = x minutes
  • steps 10-13 = 5 minutes
  • steps 14 = 3.5 hours
  • steps 15 = 20 minutes

step 1.) Order your linode.
step 2.) Chose geographic location for new linode.
step 3.) Build linode (centos 6.2):
step 4.) Boot linode

step 5.) Configure CentOS 6.2 (ETA to complete= 2 minutes)
There are a couple of procedures necessary for this step..

Connect your Linode with Putty (or use the console inside Linode Manager) to set the host name & update hosts file. The hostname should be unique, in this example, I’ll use a planetary name “pluto”.

  • step 5a.) set the *hostname

# echo “HOSTNAME=hname” >> /etc/sysconfig/network
# hostname “pluto”

  • step 5b.) update /etc/hosts file.

Linux Server default text editor is nano, use the command # nano /etc/hosts to save/exit press Ctlr-x

By default, Linode /etc/hosts file contains two rows of redundant localhost information.. Just delete & have match the following example bellow.

default /etc/hosts localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

example /etc/hosts
# localhost.localdomain localhost
# myhostname

step 6.) Update time zone (ETA to complete= 1 minutes)
# timedatectl set-timezone ‘America/Mexico_City’

step 7.) Update CentOS (ETA to download/update = roughly 20+ minutes)
# yum update

step 8.) Check that the current date did not revert after update.. (if reverted repeat step 6)
# date


step 9.) Automatic Security Updates
# yum-cron

step 10.) Configure /etc/fstab for cPanel’s disk sizes to display correctly. (ETA to complete= 1 minutes)
# nano /etc/fstab

enter the following
# /dev/xvda / ext3 noatime,usrquota,grpquota,errors=remount-ro 0 1
to save/exit press Ctlr-x

step 11.) Be sure to disable SELinux security features. (ETA to complete= 1 minutes)
# nano /etc/selinux/config

step 12.) Only SSH, Yum & Perl should be installed. (ETA to complete= 2 minutes)
To view a list of groups installed:
# yum grouplist

Installed Groups:
E-mail server
Console internet tools
Graphical Administration Tools
Hardware monitoring utilities
Legacy UNIX compatibility
Networking Tools
Perl Support

In this sample, I need to remove E-mail server.
# yum groupremove “E-mail server”

*If you don’t see Perl Support or if you want to confirm perl installation, type the following commands..
# which perl
# perl -v

step 13.) Deactivate default firewall (ETA to complete= 1 minutes)

# service iptables save
# service iptables stop
# chkconfig iptables off

step 14.) Install cPanel (ETA to download/install = roughly 3.5 hours)

# cd /home
# wget -N
# sh latest

step 15.) Virus scan (ETA to complete= 20 minutes)

It’s best practice to check your system for any vulnerabilities after you install applications and modules as you customize your web server.  You can find documentation on cPanel’s website for this.

Final step, configure cPanel for your purposes..


How to disable firewall for CentOS:
cPanel documentation on checking your system for trojans and viruses: