cPanel is a popular web hosting control panel that simplifies server management. Follow these steps to install cPanel on an AlmaLinux server.
Step 1: Update Your System
First, ensure that your server is up to date. Run the following command to update all system packages:
sudo yum update -y
Tip: Reboot your server after the update if you applied kernel updates or other critical system updates:
sudo reboot
Step 2: Set the Hostname
Ensure your server has a fully qualified domain name (FQDN). Set the hostname by running:
sudo hostnamectl set-hostname yourhostname
Replace yourhostname with your desired hostname.
Advice: Use a meaningful hostname to help manage multiple servers easily.
Step 3: Install Required Packages (Curl and Perl)
cPanel requires both curl and Perl. Install them with the following command:
sudo yum install curl perl -y
Note: Ensure you have an active internet connection for downloading packages.
Step 4: Download and Install cPanel
You can download and install cPanel using a single command:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
Alternatively, you can split the process into two steps. First, use the cURL command to download the cPanel installation script:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest
Once downloaded, run the installer:
sh latest
The installation process will take some time to complete as it downloads and configures various packages.
Advice: Monitor the installation process for any errors and consult cPanel’s documentation or support if needed.
Step 5: Access WHM
After installation, access the Web Host Manager (WHM) to complete the setup. Open your web browser and navigate to:
https://your_server_ip:2087
Replace your_server_ip with your server’s IP address. Log in using the root username and the password you set.
Tip: Bookmark the WHM URL for easy access.
Step 6: Complete WHM Setup
Follow the on-screen instructions to complete the initial WHM setup, including setting up your server’s preferences and license activation.
Advice: Review cPanel’s documentation for detailed configuration options and best practices.
Conclusion
You’ve successfully installed cPanel on your AlmaLinux server! You can now start managing your server and hosting environments through the cPanel interface.
Reminder: Regularly update your server and cPanel installation to ensure security and stability.