How to Install WHM/cPanel on CentOS 7

In the world of web hosting, WHM (Web Host Manager) and cPanel have established themselves as industry leaders, widely recognized as two prominent control panel solutions. WHM allows server administrators to efficiently manage multiple cPanel accounts, while cPanel provides an intuitive interface for individual account holders to oversee their websites and hosting settings. This powerful combination streamlines server management, simplifies website administration, and enhances the overall hosting experience.

CentOS 7, which is a Linux host distribution based on Red Hat Enterprise Linux (RHEL), is renowned for its stability, security, and long-term support. It provides a solid foundation for running WHM/cPanel, ensuring optimal performance and compatibility. Thanks to its strong community support and extensive documentation, CentOS 7 has gained the trust of numerous server administrators as a reliable choice.

WHM/cPanel offers a robust array of features and tools that greatly simplify server management and website administration. With WHM, you can effortlessly create and manage individual cPanel accounts, allocate resources, monitor server performance, and install applications with just a few clicks. On the other hand, cPanel empowers website owners and administrators to easily handle their hosting settings, emails, domains, databases, and files through an intuitive web-based interface. Consider Ultahost CPanel VPS hosting.

Requirements Before Installation

  1. CPU: At least 1 GHz or higher (dual-core recommended for better performance).
  2. RAM: Minimum 1 GB (2 GB or more is recommended for improved performance).
  3. Disk Space: At least 20 GB of free disk space (additional space for websites and data).
  4. Network: Stable internet connection with sufficient bandwidth for website traffic.
  5. CentOS 7.x: WHM/cPanel is well-supported on CentOS 7. Ensure you have the latest CentOS 7 release and updates installed.
  6. YUM Package Manager: WHM/cPanel uses YUM for package management. It should be installed and functional.

It’s essential to have a reliable and capable server that meets these requirements to ensure the smooth functioning of WHM/cPanel and to provide an optimal hosting environment for your websites and applications.

CentOS 7 Requirements to Install WHM/cPanel

  • Ensure that your CentOS 7 system is up-to-date with the latest packages and security updates. Open a terminal or SSH session and run the following commands:
sudo yum update
sudo yum upgrade
  • Assign a meaningful hostname to your server. Edit the hostname file using a text editor:
sudo vi /etc/hostname
  • Replace the existing hostname with your desired hostname, then save and exit the editor.
  • Open the network configuration file using a text editor:
sudo vi /etc/sysconfig/network-scripts/ifcfg-<interface_name>

Replace <interface_name> with the actual name of your network interface (e.g., eth0, ens32). Update the configuration with your server’s IP address, netmask, gateway, and DNS information. Save and exit the editor.

  • SELinux (Security-Enhanced Linux) can sometimes interfere with cPanel’s operation. It’s recommended to disable SELinux or set it to permissive mode. Open the SELinux configuration file:
sudo vi /etc/selinux/config
  • Change the SELINUX value to either “disabled” or “permissive.” Save and exit the editor.
  • Ensure that the necessary ports for cPanel and WHM are open in your firewall. You can use the firewall-cmd utility to add rules for the required ports:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-port=2082-2083/tcp
sudo firewall-cmd --permanent --add-port=2086-2087/tcp
sudo firewall-cmd --reload
  • Set the correct timezone for your server to ensure accurate timekeeping:
sudo timedatectl set-timezone <timezone>
  • Replace <timezone> with your desired timezone (e.g., “America/New_York”). Verify the changes with timedatectl.
  • After making these configuration changes, it’s a good idea to reboot the server to apply the changes:
sudo reboot

Installing cPanel on CentOS 7

To begin the process of installing cPanel on your CentOS 7 server, you’ll need to download the cPanel installation script. Here’s how you can do it:

WHM/cPanel Login
  • First, establish a connection to your CentOS 7 server via SSH or open a terminal.
  • In the command line, use the curl command to download the cPanel installation script. Type the following command:
curl -o latest -L https://securedownloads.cpanel.net/latest
  • Once the script is downloaded, it’s time to run the installation. Execute the downloaded installation script using the sh command:
sh latest
  • Running this command will kickstart the installation process. The script will take care of downloading all the necessary files and packages required for cPanel.
  • As the installation progresses, you’ll come across the cPanel End User License Agreement (EULA). Take some time to read through the agreement. When prompted, type ‘y’ to accept the agreement and continue with the installation.
  • Be patient and wait for the installation to complete. The duration of the process depends on your server’s specifications and internet speed. The script will handle the download and installation of various components required for cPanel.
  • Once you finish the installation, you can access the Web Host Manager (WHM) interface using a web browser. Open your preferred browser and enter the following URL: https://your_server_ip:2087
  • Remember to replace ‘your_server_ip’ with the actual IP address or hostname of your CentOS 7 server.
  • On the WHM login page, enter the root username and password associated with your server. These credentials were set up during the CentOS 7 installation or provided by your hosting provider.
WHM Account functions
  • After logging in to WHM, you’ll be guided through the initial configuration process. Simply follow the on-screen instructions to customize your server preferences, security settings, and other configurations. This includes setting a root password for MySQL, configuring nameservers, and selecting preferred update settings.

Conclusion

Setting up WHM/cPanel on CentOS 7 is a simple procedure that enables server administrators to effectively oversee their hosting environments. By following the instructions laid out in this guide, you’ll be able to install WHM/cPanel on CentOS 7 and gain access to a powerful control panel solution for website owners and administrators.

You can also read about how you can Install cPanel on your VPS.

Related Post

How to Fix “Connection reset by peer

The "connection reset by peer" problem is an issue that...

Install and Run Vue on Ubuntu 19.04

Vue is a progressive JavaScript framework used for buil...

How to Push and Pull a Docker Image from Dock

Docker is an open-source platform that enables develope...

How to Manage the VPS server from the VPS Con

Virtual Private Servers (VPS) provide robust web hostin...

How to Install Apache Tomcat on Windows

Apache Tomcat a widely used web server and Java contain...

Utilizing CTRL+ALT+DEL in RDP

Ever since the introduction of the Remote Desktop Proto...

Leave a Comment