These instructions for installing cPanel were written to help No Support VPS Hosting customers, but the steps in this article will actually work at any VPS host. The instructions in this tutorial assume a fresh VPS install. You can also read the cPanel Installation Guide from cPanel.
We recommend using 64 bit CentOS 7 for setting up cPanel. cPanel does not support Debian or Ubuntu, so those are not an option.
You will need to use SSH to connect to your VPS as root to issue the commands to configure your VPS. If you are using a Windows PC, you will need to download a free SSH client called PuTTY. Connect to your VPS's IP using SSH. Log in as root when prompted. If you have trouble logging in as root, you may need to reset your root password.
The first step is to apply updates to the operating system. In CentOS, the yum command is used to manage the updates. While logged in through SSH as root, you would enter the following commands.
yum clean all
yum list updates
yum -y update
reboot
As soon as your VPS finishes rebooting, you can log back in through SSH as root to complete the remaining steps in this tutorial.
Connect to VPS using SSH and log in as root. While logged in as root, issue the following commands. Some of these may already be installed.
yum install wget
yum install perl
yum install nano
You will need to disable the software firewall so it does not block access to the ports used by cPanel. While logged in as root through SSH, issue the following commands.
service iptables save
service iptables stop
chkconfig iptables off
If SELINUX is installed, you will need to reconfigure it so it does not conflict with cPanel. While logged in as root through SSH, issue the following command.
nano /etc/selinux/config
This will open the editor so you can adjust the SELINUX settings. If the file is empty, then SELINUX is not installed and you can simply exit the editor. If there is content in the file, you will need to edit one line.
Change "SELINUX=enforcing
" to "SELINUX=disabled
"
If you have followed each of the steps in this tutorial up to this point, then your VPS is properly prepared to install cPanel. You can either install the full version of cPanel or the DNS only version of cPanel. If you choose to use the full version of cPanel, you will need to buy a license key for cPanel.
cd /home
wget -N http://httpupdate.cpanel.net/latest
sh latest
cd /home
wget -N http://httpupdate.cpanel.net/latest-dnsonly
sh latest-dnsonly
NOTE: Only run one of the install scripts, either the full install or the DNS only install. It will take quite a while for the cPanel installer script to complete. Once it is started, you will probably want to find something else to do while you wait for it to complete.
The installer script will download and install all of the software components for cPanel. Before cPanel can be used for hosting sites, you will need to log into cPanel using the web browser on your desktop or laptop. Open http://IPADDRESS:2086/
in your web browser. Use your VPS's root login details to log into cPanel as root.
Follow the instructions in the cPanel setup pages to complete the setup of your cPanel server in your VPS.