Understanding WHM and Its Requirements
Web Host Manager (WHM) is a powerful program that allows administrative access to the back end of cPanel. Before diving into the installation process, it’s crucial to understand the system requirements for installing WHM on CentOS 7. WHM/Cpanel requires at least 1GB of RAM but 2GB is recommended for optimal performance. Additionally, you’ll need a minimum of 20GB disk space. A clean installation of CentOS 7 is also required, as WHM will not install on a server with existing data.
Prerequisites for Installation
- A fresh CentOS 7 installation.
- Root access to your server.
- At least 1GB of RAM (2GB recommended).
- Minimum of 20GB disk space available.
- A valid WHM license.
Setting Up Your Server for WHM Installation
Before proceeding with the WHM installation, it’s important to configure your CentOS 7 server properly. This includes setting up a static IP address, updating the system, and ensuring network connectivity.
Configuring Network Settings
To set up a static IP address, modify the network script found in /etc/sysconfig/network-scripts/
. Replace the DHCP settings with your static IP configuration. After configuring the network settings, restart the network service using the following command:
systemctl restart network
Updating System Packages
Ensure all your system packages are up to date by running the following commands:
yum update -y
yum upgrade -y
Disabling Network Manager
WHM does not work well with Network Manager, so it’s best to disable it with these commands:
systemctl stop NetworkManager
systemctl disable NetworkManager
Setting Hostname
Set a fully qualified domain name (FQDN) as your hostname with the following command, replacing ‘yourhostname.example.com’ with your desired hostname:
hostnamectl set-hostname yourhostname.example.com
Installing WHM on CentOS 7
With the prerequisites out of the way, we can now proceed with the actual installation of WHM.
Downloading the Installation Script
The installation script for WHM is provided by cPanel itself. Use the following command to fetch the latest version of the installer:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest
Running the Installation Script
After downloading the script, run it with the following command:
sh latest
This will begin the installation process, which may take some time depending on your server’s resources and internet connection speed.
Accessing WHM for the First Time
Once the installation completes, you can access WHM through your web browser by navigating to https://your-server-ip:2087 or https://your-hostname.example.com:2087. You will be prompted to log in with your root credentials.
Initial Configuration of WHM
Upon first login, WHM will present you with its initial setup wizard. Here, you’ll configure basic settings for your server.
Agreeing to the License Agreement
Read through and agree to the cPanel & WHM license agreement to proceed.
Setting Up Networking
Configure your contact email and networking settings. It’s essential to provide an accurate email address as WHM will send alerts and notifications to this address.
Configuring IP Addresses
Assign the IP addresses that will be used for hosting websites on your server.
Nameserver Configuration
Choose and configure your nameservers. Common options include BIND, NSD, and MyDNS.
Services Configuration
Select the services (like FTP, Mail) you want to enable on your server and their respective configurations.
Quotas Setup
Decide whether to enable quotas or not. Quotas help monitor disk space usage by users.
Securing WHM and cPanel
Security is paramount when managing servers. After completing the initial setup, it’s advisable to further secure WHM and cPanel.
Enabling cPHulk Brute Force Protection
cPHulk helps protect against brute force attacks. Enable and configure it from the Security Center in WHM.
Configuring Host Access Control
Restrict access to certain services based on IP addresses through the Host Access Control feature.
Implementing SSL Certificates
Secure your server by implementing SSL certificates for services like cPanel, WHM, and webmail.
Using Security Advisor
WHM’s Security Advisor scans your server and provides recommendations for improving security.
Troubleshooting Common Issues During Installation
Occasionally, issues may arise during the installation of WHM. Here are some common problems and their solutions.
Installation Hangs or Fails
If the installation hangs or fails, check your internet connection and server resources. Also, review the installation logs located at /var/log/cpanel-install.log
for specific errors.
License Errors
A common issue is related to licensing. If you encounter a license error, ensure that your server’s IP address has a valid cPanel license associated with it.
Networking Issues
Problems with networking can prevent WHM from functioning correctly. Double-check your network configuration and ensure that your firewall isn’t blocking necessary ports.
Frequently Asked Questions
Can I install WHM on an existing server with data?
No, WHM should be installed on a fresh CentOS 7 server without any user data to avoid conflicts.
Is it possible to use WHM without a cPanel license?
No, a valid cPanel license is required to use WHM.
What are the default ports for WHM?
WHM uses port 2087 for secure HTTP access and port 2086 for unsecured access.
How do I retrieve my WHM password if I forget it?
You can reset the WHM password using SSH access to your server as the root user.
Can I automate the installation of WHM?
Yes, you can automate the installation using a script, but manual intervention is required for the initial setup wizard.
References
- cPanel Official Documentation: https://docs.cpanel.net/
- CentOS Project: https://www.centos.org/
- cPanel Installation Guide: https://docs.cpanel.net/installation-guide/
- cPanel License Verification: https://verify.cpanel.net/