Reading Time: 5 minutes
What is cPanel?
cPanel is a server control panel which allows users the ability to access and automate both VPS server and Dedicated server tasks and, provides the tools needed to manage the overall server, their applications, and websites. Some features include the capability to modify php versions, creating individual cPanel accounts, adding FTP users, installing SSL’s, configuring security settings, and installing packages to name a few. cPanel and WHM have a vast range of customizations and configurations that can be completed to further personalize your platform specifically for your needs. It also includes 24/7 support from cPanel as well.
When purchasing a server from Liquid Web, we offer several images your server can be built from. We offer these images on most of our hosting products, including, dedicated servers, cloud dedicated servers, and our VPS offerings. Another bonus is that cPanel is supported out of the box on our fully managed servers. Our staff is well versed in providing assistance as well. Our automated install process will install and setup cPanel on your server. If you happen to have a cPanel license or are utilizing cPanel’s free trial, then please continue reading as we will be discussing how to install and setup cPanel on a CentOS 6 or 7 Linux box.
Before beginning the setup process, we must make sure your server meets the minimum install requirements for cPanel. All of our current server offerings meet these requirements, except for our lower end windows servers, ubuntu VPS’s, and core managed servers that use 4G of RAM or less. Currently, cPanel is only supported on the following operating systems.
- CentOS 6 or 7
- RHEL 6 or 7
- Amazon Linux
cPanel suggests running the installation command within a Linux screen session. Also, use the cPanel & WHM installer, which installs all of the services that it requires. https://securedownloads.cpanel.net/latest. Lastly, please obtain your licensing prior to a manual installation because, the firewall needs to be disabled during the process and leaving the server unprotected, even for a short while, can jeopardize the overall security of the server.
Access The Server Using SSH
Before proceeding with the install, you will have to access the server using SSH. I have included the following articles to assist you with this task. There are multiple ways to access the server using SSH. If you are not familiar with SSH, be sure to read the documentation below thoroughly.
It is recommended your server use a fully-qualified domain name (FQDN) for the hostname of your server and, that hostname should resolve to your servers IPv4 or IPv6 address. This setting can be modified later and is not required for the installation. You must also make sure your server has the following.
- A valid IP address
- A valid subnet address
- A default gateway IP address
- A 1:1 NAT configuration if your server resides in a NAT-configured network.
You have to disable OS firewalls before you run the cPanel installation. Once the installation is finished, it is recommended to use a third-party client. cPanel recommends that you use APF or CSF. Speaking from experience, I believe CSF is the better choice as it is more stable and easier to configure. It is also nicely integrated within WHM. This integration allows you easier access to your firewall’s configuration through a visual interface.
Deactivate firewalls on CentOS6 and RHEL6
root@server:~$ /etc/init.d/iptables save
root@server:~$ /etc/init.d/iptables stop
root@server:~$ / /sbin/chkconfig --del iptables
Deactivate firewalls on CentOS7 and RHEL7
root@server:~$ iptables-save > ~/firewall.rules
root@server:~$ systemctl stop firewalld.service
root@server:~$ systemctl disable firewalld.service
You will need to disable Network Manager before you can run the cPanel & WHM installation. This service automates your servers network settings and can disrupt connections to the IP addresses that reside in the ipaliases module. cPanel has provided the necessary steps in the documentation I have included below. Please be sure to thoroughly read through this info as several warnings and precautions need to be taken when performing this step.
When running a server using a source other than the cPanel & WHM installer, you will have to disable SELinux to run cPanel. You will have to edit the following line and change the setting to disabled within the config file.
For the installation to run, we will need to install Perl. Perl is a multi-purpose programming language initially designed primarily for text manipulation. Perl has since has grown to be used for a wide range of tasks, includes system administration, network programming, and GUI development to name a few. If you are interested in learning more about this programming language, I have included a link below to help get you started.
It is recommended to install this before running the script. However, if Perl is not set up before the cPanel & WHM install script being run, the installer will attempt to install Perl for you. You can easily accomplish this beforehand by running the following command as root or an SSH user with sudo privileges.
root@server:~$ yum install perl -y
Now that we have gone through the requirements for cPanel, we can now proceed with the installation. However, now would be an excellent time to acquire a cPanel license. If you continue with the installation, cPanel will automatically begin a 15-day free trial. When registering your license, be sure you provide a correct IP address. cPanel offers several varieties of licenses which can be tailored to fit your needs. You can view these by visiting the link below.
Once you have acquired your license, you can proceed.
- Access your server using SSH as the root user.
- Run the following command to begin the installation. (It is recommended to run the scan within a screen but, it is not required. If you choose not to run the install from within a screen, be sure to keep your terminal open, as closing the terminal could end the session which would result in a failed install.)
root@server:~$ cd /home
root@server:~$ curl -o latest -L https://securedownloads.cpanel.net
root@server:~$ sh latest
This set of commands changes the active directory you are currently working in to /home. It then downloads the latest version of WHM & cPanel and the final command runs the installation for you. Once the installation is complete, be sure to note the output near the end of the script. It provides some useful information on how to get you started and access the WHM & cPanel interface for the first time.
I have also included some addition cPanel documentation to assist you further with accessing the cPanel or WHM interface.
Important information from cPanel
- cPanel will only license publicly visible static IP addresses.
- There is no uninstaller for cPanel. It is recommended to reformat your server to remove cPanel.
- WHM & cPanel is designed to only be installed on newly installed operating systems.
- Be sure to run the installer as root or a user with sudo privileges.
- It is recommended that you do not introduce additional services before running the installer
cPanel is one of our most utilized server management panels. Our admins have an extensive knowledge of all of its interworkings and are always available to help out of you have a thought or question about its operation or usage. Should you have any difficulty with any part of its functionality, please do not hesitate to reach out to one of our support admins via a ticket at firstname.lastname@example.org
or, opening a chat
with us or giving us a call at 1-800-580-4985. We are here 24/7/365 to assist!