cPanel is a comprehensive web hosting control panel that simplifies the management of websites and servers. CentOS 7, with its stability and long-term support, is an excellent platform for hosting. This guide will walk you through the steps needed to install cPanel on CentOS 7, ensuring a successful setup.
Prerequisites
- A fresh installation of CentOS 7.
- Root access or a user with sudo privileges.
- Minimum 2GB RAM (4GB or more recommended).
- At least 20GB of free disk space.
Step 1: Update Your System
Start by updating your system to ensure all packages are current. This enhances the security and performance of your system.
sudo yum update -y
Step 2: Disable Network Manager
To disable network manager service, run these commands in your terminal:
systemctl stop NetworkManager
systemctl disable NetworkManager
Step 3: Set Hostname
Ensure your server has a fully qualified domain name set, which is required for cPanel.
sudo hostnamectl set-hostname your-hostname.example.com
Step 4: Install cPanel
Now, download and run the cPanel installation script. This will take some time, so please be patient.
curl -o latest -L https://securedownloads.cpanel.net/latest
sudo sh latest
After the installation completes, you can access the cPanel & WHM interface through your web browser by navigating to your server's IP address followed by the port 2087 (for WHM) or 2083 (for cPanel). The first login will guide you through the initial setup process, which includes accepting the license agreement and setting up an administrative user.
Note: The installation and initial setup process may take some time, so patience is key. Once completed, you'll have a powerful tool at your disposal for managing your hosting environment.