How to Install cPanel

Step by Step Guide

 

How to Install cPanel in your VPS

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.

Select the right Operating System

We recommend using 32 bit CentOS 6 for setting up cPanel. cPanel does not support Debian or Ubuntu, so those are not an option. Technically speaking, you could use 32 bit or 64 bit CentOS. We recommend 32bit, because 64bit will use more memory due to the additional length of each memory pointer. Also, at No Support VPS Hosting, we include 2GB of memory burstable to 4GB. It only makes sense to use 64bit when you are using more than 4GB of memory.

SSH

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.

Update the Operating System

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.

Install Dependencies

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

Disable the Firewall

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

Disable SELINUX

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"

Ready to Install cPanel

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.

To install the full version of cPanel, enter these commands as root.

cd /home
wget -N http://httpupdate.cpanel.net/latest
sh latest

To install the DNS-Only version of cPanel, enter these commands as root.

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.

Final cPanel Configuration

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.