In order to install cpanel/WHM on your VPS ,  you will need to log into your server as root first.

ssh root@server-ip

In above server-ip should be your server’s  ip. We should install cpanel/whm only in a fresh system ,configured with a proper yum or apt-get system .

From a windows machine we can use putty to log into the server …

Minimum Requirements as per cpanel’s original site

Processor 266 MHz
Memory 512 MB RAM (1 GB recommended when hosting many accounts)
Disk Space 10 GB hard disk

Removing YUM groups

To obtain a list of yum groups, run the command:

yum grouplist

You should make sure these yum groups are not installed:

  • FTP Server
  • GNOME Desktop Environment
  • KDE (K Desktop Environment)
  • Mail Server
  • Mono
  • Web Server
  • X Window System

To remove a yum group, run the command yum groupremove. For example, if you wish to remove Mono and Mail Server, enter:

yum groupremove "Mono" "Mail Server"

Disabling SELinux security features

You should disable SELinux after installing Red Hat Enterprise Linux, CentOS, or CloudLinux. To disable SELinux, you can either:

  • Use the graphical interface while configuring your operating system, or
  • Edit /etc/selinux/config from the command line and set the SELINUX parameter to disabled using a text editor, such as nano or vi.

If you disable SELinux from the command line, the contents of /etc/selinux/config should resemble:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

Deactivating default firewall and checking for updates

If you are installing a CentOS, Red Hat Enterprise Linux, CloudLinux operating system, you should deactivate the default firewall and check for updates.

To deactivate the firewall, run the commands:

chkconfig iptables off
service iptables stop

To check for updates, run the command:

yum update

change the hostname of the VPS to a valid hostname like “server.domain.com”.

Installing cpanel

The installation of cPanel can take a long time and it is better if you install “screen”. Depending on your operating system you can install screen running yum or apt-get (yum install screen or apt-get install screen).

Now you will want to download and install cPanel:

screen -S cpanel
cd /home
wget http://layer1.cpanel.net/latest
sh latest

ctrl -A-D …to detach from screen

screen -ls will list the screens

If you get disconnected, you can ssh back into your server as root, and run: 
screen -r cpanel

After everything is complete, and there are no errors, you should be able to access the WHM control panel by visiting

https://your_ip:2087