Install WHM/cpanel on centos using SSH

Please note:

  1. Install cPanel & WHM on a freshly-installed Dedicated Server.
  2. You must log in to the server as the user root in order to install cPanel & WHM. If you have no access to root, please contact your system administrator or web hosting, provider.
  3. If you install services before you install cPanel & WHM, you will encounter compatibility issues.

Installation Requirements:

  1. Completely fresh OS install.
  2. Minimum 1GB of RAM.
  3. Minumum of 20GB of space.
  4. You need a licence of cpanel (you can install trial version also for the first installation).

First, check the version of Centos:

cat /etc/redhat-release

You can update your version by simply running below command:

yum update

Once the update is completed, it usually takes 5-10 minutes depending on your server speed. You should set your server a hostname.

For setting up hostname you can use this command:


Then you need to install screen, as it is recommended to run cpanel installation script in the background as it takes 30-40 minutes to complete the installation.

Please use the below command to install screen:

yum install screen

Once the screen is installed, go to the screen session using “screen” command:


Start cpanel installation using the command:

cd /home && curl -o latest -L && sh latest

Once your cpanel installation is completed, you can go to the GUI mode of cpanel by browsing below links from any browser such as google chrome, firefox, safari, etc


And you are done with cpanel installation. GUI setup is much self-explanatory, and you just need to follow steps.