How to install cPanel, Full cPanel Installation Guide

This is the complete guide on installing cPanel and WHM on your server. Let's get started.

Updated: 07 Nov, 23 by Susith Nonis 11 Min

List of content you will read in this article:

cPanel is an online Linux-based graphical interface (GUI) that is used as a control panel to simplify website and server management. With cPanel you can publish websites, manage domains, organize web files, create email accounts and many more. 

cPanel is one of the most popular control panels in the whole world. Monovm provides the cPanel control panel with all our web hosting services. cPanel has two interfaces, a user interface called cPanel and a server management interface called Web Host Manager (WHM). This combination allows users to manage their website and supplies hosting providers with tools to manage the server. 

Your cPanel account is completely secure and your account is private. If you are a website owner, then be sure to keep your username and password secure. This is important for keeping your website information and settings safe.

Choosing the best cPanel host to meet the needs of your WordPress website is important. You should be careful to select a web host based on its reliability, performance, customer support, features, and pricing. You can check it from our web hosting platform. 

However, if you are thinking to yourself what other software is there that can do the same thing.

Yes, there are cPanel alternatives out there. Here are our top alternatives:

  • Plesk
  • Webmin
  • Froxlor
  • CentOS Web Panel
  • Zpanel
  • Ajenti
  • Vesta

That's a brief intro into cPanel: let's get to the installation guide of cPanel on your server.

Operating system Processor RAM Disk Space Architecture
CentOS 7, CloudLinux 7, or RHEL 7 1.1 GHz

Minimum: 1 GB

Recommended: 2 GB

Minimum: 20 GB

Recommended: 40 GB

64-bit
CloudLinux 6 1.1 GHz

Minimum: 768 MB

Recommended: 1 GB

Minimum: 20 GB

Recommended: 40 GB

64-bit
CentOS 8 and CloudLinux 8
Experimental
1.1 GHz

Minimum: 1 GB

Recommended: 2 GB

Minimum: 20 GB

Recommended: 40 GB

64-bit

As you see here, the minimum requirements for installing cPanel is shown. However, we strongly recommend having a much higher performance in order to not face any problems. 

However, these are some things to take note of:

  • We strongly recommend that you install at least 3 GB of RAM if you want to install the Clam AntiVirus Scanner (ClamAV) antivirus software.

  • We strongly recommend that installations on the Amazon® hyperscaler use the cPanel & WHM AWS Marketplace listing. That image uses the CentOS operating system.

  • We do not support Amazon Linux 2, and Amazon Linux 1 reached End Of Life status on June 30, 2020. For more information, read the cPanel Deprecation Plan.

So what is the best way to install cPanel?

The best operating system to install cPanel is to use CentOS 7 and CloudLinux. While this is the best recommendation, some might have a question  as "can I install cPanel on CentOS 8?" We added an experimental version of cPanel & WHM version 92 that has minimal functionality in CentOS 8 and CloudLinux 8 servers. cPanel & WHM version 92 for CentOS 8 and CloudLinux 8 is experimental software and is not recommended for production environments. For more information, read our cPanel & WHM for CentOS 8 documentation.

Additional partitions improve performance for some servers, especially servers with high email volume. The OS can only access a limited number of files per partition. CentOS’s automatic partitioning scheme is not optimized for cPanel servers. This scheme creates a relatively small home partition and a relatively large root partition (/).

In order to optimize space partitions for CentOS, we recommend the following options: Use your hosting provider’s CentOS 7 or 8 image to install cPanel & WHM.

Partition RAM and minimum size
/ N/A — Grow to fill disk (40 GB recommended, 20 GB minimum).
Note:
To host a greater number of accounts, allocate more disk space to this partition.
swap
  • 2 GB or less — Two times the amount of RAM on the server.
  • 2 GB to 4 GB — The same as the amount of RAM on the server.
  • 4 GB or more — 4 GB

You can create the partitions by checking the recommended partition scheme in CentOS 7.

During the installation of cPanel, it will need to open the necessary ports. Without disabling the firewall, you will have some problems therefore we recommend disabling OS firewalls before you run the cPanel & WHM installation.

When the installation process finishes, we recommend that you then configure a firewall with a third-party client. such as APF or CSF.

Important:

Red Hat® Enterprise Linux (RHEL), CloudLinux™, and CentOS distributions allow you to disable the firewall for the operating system’s installation configuration. We strongly recommend that you use this method.

To deactivate firewalls on CloudLinux 6, run the following commands:

1
2
3
/etc/init.d/iptables save
/etc/init.d/iptables stop
/sbin/chkconfig --del iptables

To deactivate firewalls on CentOS 7 and 8, CloudLinux 7 and 8, and RHEL 7, run the following commands to deactivate the firewall, where ~/firewall.rules represents the firewall rules file:

1
2
3
iptables-save > ~/firewall.rules
systemctl stop firewalld.service
systemctl disable firewalld.service

3. Disable SELinux

You must disable SELinux to make your system compatible with cPanel & WHM.

To disable SELinux security features, use one of the following methods:

  • Use the graphical interface to disable SELinux while you configure your operating system, and then reboot the server.

  • Edit the /etc/selinux/config file to set the SELINUX parameter to disabled, and then reboot the server. The contents of the /etc/selinux/config the file should resemble the following example:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    # enforcing - SELinux security policy is enforced.
    # permissive - SELinux prints warnings instead of enforcing.
    # disabled - No SELinux policy is loaded.
    SELINUX=disabled
    # SELINUXTYPE= can take one of these two values:
    # targeted - Only targeted network daemons are protected.
    # strict - Full SELinux protection.
    SELINUXTYPE=targeted
    Important:

    Make certain that the number sign (#does not precede SELINUX=disabled. If a # precedes this configuration option, the system will ignore the option.

4. Disable the Network Manager service

In order to proceed further with the cPanel installation, you need to Disable the Network Manager service. To disable the Network Manager service, perform the following steps:

  1. Disable Network Manager with the following commands:

    • CentOS 6, CloudLinux 6, Red Hat Enterprise Linux 6 (RHEL), or Amazon Linux:

      1
      2
      
        service NetworkManager stop
        chkconfig NetworkManager off

       

    • CentOS 7, CloudLinux 7, or RHEL 7:

      1
      2
      
        systemctl stop NetworkManager
        systemctl disable NetworkManager

       

  2. Change to the /etc/sysconfig/network-scripts directory.

  3. Open the ifcfg-eth0 and ifcfg-lo files with your preferred text editor and, if they exist, set the following keys’ values:

    1
    2
    
    NM_CONTROLLED=no
    ONBOOT=yes
    Important:
    If either of these keys does not exist in your ifcfg-eth0 and ifcfg-lo files, do not add it. Instead, proceed to Step 4.
  4. Run the following commands to restart the network:

    • CentOS 6, CloudLinux 6, RHEL 6, or Amazon Linux:

      1
      2
      
        chkconfig network on
        service network start

       

    • CentOS 7, CloudLinux 7, or RHEL 7:

      1
      2
      
        systemctl enable network.service
        systemctl start network.service

5. Perl installation

To proceed further with the installation, you need to install Perl on your server. 

 yum -y install perl

Once you come to this point, you need to update your operating system.

yum update

Now your server is ready, so let's go to the installation of cPanel.

Enter this command will install cPanel on your server. This command changes your session to the home directory, downloads the latest version of cPanel & WHM, and runs the installation script.

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

We recommend that you run the installation command within a Linux screen session. The Linux screen command allows you to create a shell session that will stay active even if there is a network disruption.

    • If your system does not contain screen, you can install it with the yum install screen command.
    • To run a screen session, enter the screen command. Then, run the installation command.

If your session disconnects for some reason, log back into your server and run the screen -r command. This will reconnect you to your screen session.

Frequently asked questions

1. Is it okay if I install cPanel on my local device?

cPanel, L.L.C. designs software for commercial hosting. Therefore, cPanel only licenses publicly visiblestatic IP addresses. Since cPanel doesn't license dynamic, reserved, sticky, or internal IP addresses you should avoid it.

2. Once cPAnel is installed, can I uninstall it?

No. cPanel does not provide an uninstaller. If you wish to remove our software, you must reformat the server.

3. Can I install cPanel and WHM on my existing server?

Only install cPanel & WHM on a freshly-installed operating system.

4. I can't install cPanel on my server, what can I do?

You must log in to the server as the root user in order to install cPanel & WHM. If you do not possess root-level access, contact your system administrator or hosting provider for assistance.

5. What is the best way to install cPanel and WHM?

We recommend that you use the cPanel & WHM installer, which installs all of the services that it requires. If you install services before you install cPanel & WHM, you will encounter compatibility issues.

6. How to disable the fast installation mode?

New installations of cPanel & WHM default to the fast installation mode. To disable the fast installation mode, use the steps in our Customize Your Installation documentation.

Congratulations, you have successfully installed cPanel on your server. Let us know in the comments how helpful this article was and share it with your friends and colleagues. 

Susith Nonis

Susith Nonis

I'm fascinated by the IT world and how the 1's and 0's work. While I venture into the world of Technology, I try to share what I know in the simplest way with you. Not a fan of coffee, a travel addict, and a self-accredited 'master chef'.

user monovm

Ashkan

2021, Nov, 21

Hi there, First of, Thanks for the guide, I suggest you to just move the part 5 to the beginning of this guide (partitions part) Usually people who are reading this kinda articles, prefer to go step by step and do the job, most of them doesnt know even basics or trying to learn some stuff, so i guess if you give them this details on a exact time, it would be more useful for them,,, Anyway, you have done a great job and really appreciate it :)

user monovm

Susith Nonis

2022, Feb, 22

Hey Ashkan, thank you for your reply. We will make the relevant changes as per your suggestion!