How To Install cPanel on a Virtual Server Running Rocky or Centos Linux

Let’s install cPanel

Let’s use screen to install. To start off, go ahead and install screen and wget:

yum install wget screen -y

Once screen is installed, start a new session running:


After opening screen, you can proceed to install cPanel. Use this this command to install cPanel with WHM:

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

Then close out of screen. The script will continue running while in the background—even if you close out the of server.

In order to detach screen type:


To reattach to your screen you can use the command:

screen -r

Once cPanel finally installs, you can access the login by going to http://ipaddress:2087 (eg. or domain (

Leave a Comment