How to Install cPanel & WHM in CentOS 6
Installation of cPanel in CentOS and RHEL 6
# cat /etc/redhat-release CentOS release 6.4 (Final)
If you don’t have the latest version, please update your OS to its latest version, In CentOS and RHEL, we can simply do it with yum package installer.
# yum update
Once updates completes, and then check the latest OS version with same above command.
# cat /etc/redhat-release CentOS release 6.5 (Final)
Next, ensure that your system has a standard hostname as shown in example below.
# hostname cpanel.yourdomain.com
Once you’ve ensured the OS version and hostname, you don’t have to install any other dependency packagees, cPanel auto installer script does all for you. We can download cPanel installer file under /home directory.
# cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
This above command changes your session to the home directory, downloads the most recent version of cPanel & WHM, and runs the installation script.
Important: I strongly recommended to run cPanel auto installer script in screen mode if you are doing it with SSH because it takes 30-40 minutes to complete the installation depending on your server resources and bandwidth speed.
Sample Output
Verifying archive integrity... All good. Uncompressing cPanel & WHM Installer..... ____ _ ___| _ \ __ _ _ __ ___| | / __| |_) / _` | '_ \ / _ \ | | (__| __/ (_| | | | | __/ | \___|_| \__,_|_| |_|\___|_| Installer Version v00061 r019cb5809ce1f2644bbf195d18f15f513a4f5263 Beginning main installation. 2017-03-04 04:52:33 720 ( INFO): cPanel & WHM installation started at: Sat Mar 4 04:52:33 2017! 2017-03-04 04:52:33 721 ( INFO): This installation will require 20-50 minutes, depending on your hardware. 2017-03-04 04:52:33 722 ( INFO): Now is the time to go get another cup of coffee/jolt. 2017-03-04 04:52:33 723 ( INFO): The install will log to the /var/log/cpanel-install.log file. 2017-03-04 04:52:33 724 ( INFO): 2017-03-04 04:52:33 725 ( INFO): Beginning Installation v3... 2017-03-04 04:52:33 428 ( INFO): CentOS 6 (Linux) detected! 2017-03-04 04:52:33 444 ( INFO): Checking RAM now... 2017-03-04 04:52:33 233 ( WARN): 2017-03-04 04:52:33 233 ( WARN): To take full advantage of all of cPanel & WHM's features, 2017-03-04 04:52:33 233 ( WARN): such as multiple SSL certificates on a single IPv4 Address 2017-03-04 04:52:33 233 ( WARN): and significantly improved performance and startup times, 2017-03-04 04:52:33 233 ( WARN): we highly recommend that you use CentOS version 7. 2017-03-04 04:52:33 233 ( WARN): 2017-03-04 04:52:33 233 ( WARN): Installation will begin in 5 seconds. ....
Now, you need to wait for the cPanel installer script to complete its installation.
What Auto Installer Script Does for You
cPanel heavily modifies your operating system and that is the reason that no cPanel Uninstaller available on the web so far, you need to reformat your server to remove cPanel completely from your server.
- It checks for various packages to ensure that there will be no conflicts and it finds any package conflict, it uninstalls previous packages with yum and that’s why its recommended to install cPanel on a Fresh OS.
- Downloads language and base files for installation.
- Installs various Perl modules through CPAN and other required packages with yum.
- Downloads and compiles PHP and Apache with various associated modules.
Once that script completes its installation, it will shows up that cPanel installation is complete. You may be asked to reboot the server after installation.
After that you need to complete the installation wizard from its web based interface and you can access WHM with the following URL.
http://your-server-ip:2087 OR http://your-host-name:2087
Now you are ready to login to your WHM/Cpanel and start with your desired configuration.