cPanel is a widely used web hosting control panel that provides an easy-to-use interface for managing web hosting servers. In this comprehensive guide, we will walk you through the process of how to install cPanel on Rocky Linux, a popular open-source Linux distribution that has gained traction as a reliable and stable platform for hosting web services.
Prerequisites
Before proceeding, ensure you have the following:
- A fresh installation of Rocky Linux (minimum version 8.3).
- A cPanel license. If you don’t have one yet, you can purchase a license from the cPanel website.
- Root access to your Rocky Linux server.
How to Install cPanel on Rocky Linux
Update Your System
First, update your Rocky Linux system to the latest version using the following command:
sudo dnf update -y
Set the Hostname
Set the hostname of your server using the hostnamectl
command. Replace {your_domain}
with your actual domain name:
sudo hostnamectl set-hostname cpanel.{your_domain}
Disable SELinux
For cPanel to work correctly, you need to disable SELinux. To do so, open the /etc/selinux/config
file in your favorite text editor, such as nano:
sudo nano /etc/selinux/config
Change the SELINUX
line to disabled
:
SELINUX=disabled
Save the changes and exit the text editor. Finally, reboot your server to apply the changes:
sudo reboot
Installation Required Dependencies
Install the required dependencies using the following command:
sudo dnf install -y perl wget
Install cPanel on Rocky Linux
Now you are ready to install cPanel. Download the cPanel installation script using wget:
wget https://securedownloads.cpanel.net/latest
Then, execute the script to start the installation:
sudo sh latest
The installation process may take some time to complete, depending on your server’s resources. Once the installation is finished, you will see a success message.
Access cPanel, WHM
Open your web browser and access the cPanel WHM (WebHost Manager) interface using your server’s IP address or domain name, followed by the port 2087
. For example:
https://cpanel.{your_domain}:2087
or
https://{your_server_IP}:2087
You will be prompted to accept the cPanel license agreement. Once you accept it, you will be redirected to the WHM login page.
Log in to WHM and Configure cPanel
Log in to WHM using your root username and password. Once logged in, you will be prompted to complete the initial setup process. Follow the on-screen instructions to configure your server.
You can now create cPanel accounts and manage your web hosting environment using the easy-to-use WHM interface.
Step 8: Update cPanel License
If you need to update your cPanel license, follow our guide on how to update your cPanel license from the command line.
Additional Resources
For more information on managing your Rocky Linux server, check out the following resources:
- How to Install Python on Rocky Linux
- How to Install MySQL on Rocky Linux
- How to Install MariaDB on Rocky Linux
- How to Install CSF on Rocky Linux
- How to Install PHP on Rocky Linux
- How to Install phpMyAdmin on Rocky Linux
Conclusion
By following the steps outlined in this guide, you have successfully installed cPanel on your Rocky Linux server. You can now manage your web hosting environment with ease using the powerful features provided by the cPanel/WHM interface.
Whether you are a seasoned web hosting professional or a beginner, cPanel offers an intuitive and user-friendly platform for managing your web hosting server. With Rocky Linux as your server’s operating system, you can rest assured that you are running your services on a stable and reliable platform. Remember to keep your server updated and secure to ensure the best performance and security for your hosted websites.
If you are interested in exploring other options for web hosting, check out our article on the Top 10 Best Linux OS for Web Hosting.