how to install cpanel on almalinux
Here are the steps to install cPanel on AlmaLinux 9. This process requires a fresh installation of the operating system and is performed via the command line. You must have a cPanel license and be logged in as the root user on your server.
Step 1: Prepare the Server
Before you begin, ensure your server meets the minimum requirements and is ready for the cPanel installation.
- Fresh Installation: cPanel must be installed on a freshly installed operating system.
Hostname: Set a valid fully qualified domain name (FQDN) as the server’s hostname. For example,
host.yourdomain.com
. You can check the hostname with the commandhostname
. - Disable SELinux: For the cPanel installer to run without issues, you must disable SELinux.
- Open the SELinux configuration file:
nano /etc/selinux/config
- Change the line
SELINUX=enforcing
toSELINUX=disabled
. - Reboot the server for the change to take effect:
reboot
- Open the SELinux configuration file:
Step 2: Navigate to the Home Directory
After the server reboots and you log back in via SSH, navigate to the /home
directory. This is the recommended location for the installation script.
cd /home
Step 3: Download and Run the Installer
Now, you will download and execute the official cPanel installation script.
- Download the script: Use the
curl
command to download the latest cPanel installer.Bashcurl -o latest -L https://securedownloads.cpanel.net/latest
- Run the script: Execute the script to begin the installation. The installation is a long process and will handle all dependencies for you.
Bash
sh latest
The installation can take anywhere from 20 to 60 minutes, depending on your server’s hardware and internet connection speed. Do not close your SSH terminal during this time.
Step 4: Complete the Installation in WHM
Once the script finishes, you will be given a URL to access your WebHost Manager (WHM).
- Access WHM: Open a web browser and go to
https://your_server_ip:2087
orhttps://your_server_hostname:2087
. - Log in: Use
root
as the username and your server’s root password. - Accept the EULA: Read and accept the End User License Agreement.
- Set up the server: Enter your email address and the cPanel license key. This is a critical step to activate your cPanel installation. If you don’t have a license, you can sign up for a trial.
After these final steps, your cPanel installation on AlmaLinux 9 is complete, and you can begin creating cPanel accounts and managing your websites through the WHM interface.