Posted on June 28, 2024 by darshin
What is cPannel/WHM
For web hosting professionals and enthusiasts alike, cPanel stands as one of the most popular and user-friendly control panels available. Offering a robust suite of features, it simplifies server and site management, making it an essential tool for anyone managing multiple websites or web applications. If you’re running CentOS 7 and looking to harness the power of cPanel, this guide will walk you through the entire installation process step-by-step. From preparing your server to completing the installation, we’ve got you covered. Let’s dive in and get your CentOS 7 server ready with cPanel, ensuring you can manage your web hosting environment with ease and efficiency.
Prerequisites
Before you begin the installation process, ensure that you have the following:
-
A fresh installation of CentOS 7.
-
A minimum of 1 GB of RAM (2 GB recommended).
-
At least 20 GB of free disk space.
-
Root access to the server.
-
A valid cPanel license. You can obtain a license from cPanel’s official website.
Step 1: Update Your Server
Before installing any software, it’s essential to update your server to ensure all existing packages are up to date. Run the following command to update your CentOS 7 server:
yum update -y
Step 2: Set the Hostname
cPanel requires a fully qualified domain name (FQDN) as the hostname. You can set the hostname using the hostnamectl
command. Replace your.hostname.com
with your desired hostname:
hostnamectl set-hostname your.hostname.com
Verify the hostname:
hostname
Step 3: Disable SELinux
cPanel does not support SELinux, so you need to disable it. Open the SELinux configuration file:
nano /etc/selinux/config
Find the line SELINUX=enforcing
and change it to SELINUX=disabled
:
SELINUX=disabled
Save and close the file, then reboot your server:
reboot
Step 4: Install Required Packages
cPanel requires Perl and several other packages to run correctly. Install them using the following command:
yum install -y perl curl
Step 5: Download and Install cPanel
Navigate to the /home
directory:
cd /home
Download the latest cPanel installer using curl
:
curl -o latest -L https://securedownloads.cpanel.net/latest
Start the installation process:
sh latest
The installation process can take anywhere from 30 minutes to a couple of hours, depending on your server’s speed and resources. During the installation, cPanel will install all necessary dependencies and set up the control panel.
Step 6: Access cPanel and WHM
Once the installation is complete, you can access cPanel and WHM (Web Host Manager) using your server’s IP address. Open your web browser and navigate to:
https://your-server-ip:2087
You will see the WHM login screen. Log in using the root
username and the root password of your server.
Step 7: Complete the Setup Wizard
After logging in, you’ll be greeted by the WHM setup wizard. Follow the on-screen instructions to complete the initial configuration of cPanel and WHM. This includes:
-
Agreeing to the license agreement.
-
Setting up your contact information.
-
Configuring basic networking settings.
-
Configuring nameservers.
Step 8: Secure Your cPanel Installation
To enhance the security of your cPanel installation, follow these steps:
-
Enable a firewall (e.g., CSF – ConfigServer Security & Firewall).
-
Use strong passwords for all accounts.
-
Regularly update cPanel and installed software.
-
Enable automatic backups.
Conclusion
Congratulations! You have successfully installed cPanel on your CentOS 7 server. With cPanel and WHM, you can now manage your web hosting environment with ease and efficiency. Remember to keep your system updated and secure to ensure smooth operation.
Leave A Comment
What’s happening in your mind about this post !