In this blog post, we’ll guide you through the process of installing WHM/cPanel on AlmaLinux 8, a robust, open-source RHEL fork designed for enterprise environments.
Prerequisites
Before we begin, ensure you have the following:
- A fresh installation of AlmaLinux 8.
- Root or sudo access to the server.
- A valid cPanel license.
- A minimum of 2GB RAM and 20GB disk space (though more is recommended for optimal performance).
Step-by-Step Installation Guide
Step 1: Update Your System
First, update your system to the latest packages to ensure compatibility and security.
sudo dnf update -y
Step 2: Set the Hostname
Set a fully qualified domain name (FQDN) for your server. This is necessary for cPanel to function correctly.
sudo hostnamectl set-hostname yourdomain.com
Verify the hostname:
hostnamectl
Step 3: Disable Network Manager (if applicable)
Network Manager can sometimes conflict with cPanel. Disable it to avoid potential issues.
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
Step 4: Install Perl
cPanel requires Perl to run. Install it using the following command:
sudo dnf install perl -y
Step 5: Download and Run the cPanel Installer
Navigate to the home directory and download the latest cPanel installation script.
cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
Run the installation script. This process can take some time, depending on your server’s speed and internet connection.
sudo sh latest
Step 6: Complete the Installation
Once the installation is complete, you can access WHM to complete the setup.
- Open a web browser and navigate to
https://yourserverIP:2087
. - Log in using the root user credentials.
- Follow the on-screen instructions to configure WHM. You will need to enter your cPanel license key during this setup.
Step 7: Configure Basic Settings in WHM
After logging into WHM for the first time, you’ll want to configure some basic settings:
- Server Configuration: Set your contact information and configure basic server settings.
- Setup Networking: Verify your server’s hostname, resolvers, and IP addresses.
- Setup Server: Configure the nameservers, FTP services, and other options according to your needs.
- Security Center: Set up security measures such as a firewall, SSH keys, and other recommended security settings.
Step 8: Create cPanel Accounts
Now that WHM is configured, you can start creating cPanel accounts for your domains.
- Navigate to
Account Functions
->Create a New Account
. - Fill in the domain, username, password, and other required details.
- Click
Create
to finalize the new cPanel account.
Conclusion
Installing WHM/cPanel on AlmaLinux 8 is a straightforward process that greatly enhances your server management capabilities. By following these steps, you’ll have a powerful and user-friendly hosting environment ready to go. With WHM/cPanel, you can efficiently manage websites, domains, emails, and more, making it an excellent choice for both beginners and experienced server administrators.
Feel free to reach out if you encounter any issues during the installation or if you have any questions. Happy hosting!