Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to install cPanel on a CentOS server

This guide shows you how to put cPanel and WHM on a fresh CentOS server. It needs root access, so it is for VPS and dedicated server owners.

cPanel2 min read10 steps

What are we installing?

cPanel and WHM are control panels. They turn a plain server into a hosting server with buttons and menus. CentOS is a free Linux system. Linux is an operating system, like Windows but for servers.

Tip: CentOS is old software. CentOS 7 and 8 are no longer supported, and current cPanel versions need newer systems such as AlmaLinux or Rocky Linux. The steps are similar on those systems. Check cPanel's current list of supported systems first.

cPanel is paid software. You need a licence. A licence is a permit to use the software. Ask Hostvento support if your plan includes one.

Before you start

  • Use a fresh server. Do not install on a server that already hosts sites. The installer changes many things.
  • Check the server has enough memory and disk space. See cPanel's current needs on its own pages.
  • Set a proper hostname. A hostname is the server's name, like server.example.com. It must be a full name, not just one word.
  • Make sure the server has a fixed IP address.
  • Have root login ready.

Steps

  1. Log in over SSH as root. SSH lets you type commands on a server from far away.
  2. Set the hostname.
    hostnamectl set-hostname server.example.com
    This sets the server name. Use your own name.
  3. Update the system.
    yum update -y
    This installs the latest fixes.
  4. Install the download tools.
    yum install -y perl curl
    cPanel's installer is a Perl script. This makes sure Perl and curl are there.
  5. Move to the home folder.
    cd /home
  6. Download the installer.
    curl -o latest -L https://securedownloads.cpanel.net/latest
    This saves cPanel's official install script as a file named latest.
  7. Run it.
    sh latest
    This starts the install. It can take from 30 minutes to over an hour. Do not close the window. Use screen if your connection is shaky.
  8. When it ends, restart the server if asked.
  9. Open WHM in your browser at https://YOUR-SERVER-IP:2087. Log in as root.
  10. Follow the setup wizard. Accept the terms, add your contact email and set the nameservers.

After the install

  • Make sure the cPanel licence is active. Without it, WHM will not open.
  • Open ports for cPanel in your firewall.
  • Create your first account in WHM.

Quick recap

  • Install cPanel only on a fresh server with a proper hostname.
  • Download the official script and run it as root.
  • Open WHM on port 2087 and finish the wizard.
  • CentOS is old. Use a supported system when you can.