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:

hostname cpanel.myvpshost.org

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:

screen

Start cpanel installation using the command:

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && 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

http://your-server-ip:2086
OR
https://your-host-name:2087

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