This comprehensive guide covers everything you need to know about installing and configuring CloudLinux on cPanel VPS. Whether you’re working with CentOS, AlmaLinux, RHEL, or exploring experimental support for Ubuntu/Debian, this step-by-step guide provides all necessary commands, tips, and detailed explanations to confirm a smooth installation process.
1. What is CloudLinux?
CloudLinux is an OS designed to improve shared hosting environments. It isolates server users into Lightweight Virtual Environments (LVEs), ensuring stability and security by preventing any single user from consuming excessive resources.
Key Features of CloudLinux:
- Resource Isolation: Each user is contained in their LVE, preventing “noisy neighbors.”
- Increased Security: Tools like CageFS and KernelCare add extra layers of protection.
- Improved Stability: Stops resource spikes from crashing the server.
- PHP and Python Selector: Users can choose their preferred PHP/Python versions.
- Optimized Performance: Maximizes efficiency for shared hosting environments.
2. Why Use CloudLinux on cPanel VPS?
Combining CloudLinux with cPanel/WHM offers the ultimate hosting experience. Here’s why:
- Control Resource Allocation: Prevents a single cPanel account from overloading the server.
- Increased User Experience: Each account operates independently, minimizing performance drops.
- Simplified Management: CloudLinux integrates seamlessly with cPanel/WHM through tools like LVE Manager.
- Robust Security: CageFS isolates users, while KernelCare ensures kernel-level protection without downtime.
3. System Requirements
Before starting the installation, make sure of the following:
- Supported Operating Systems:
- CentOS 7 or 8
- AlmaLinux 8 or later
- RHEL 7 or 8
- Ubuntu/Debian (experimental)
- cPanel/WHM installed and licensed.
- Root Access to the VPS.
- A CloudLinux License Key, which you can purchase from the CloudLinux website.
4. Preparing for CloudLinux Installation
Backing Up Your Server
Always back up your server before making significant changes. Use the cPanel backup script:
/usr/local/cpanel/scripts/cpbackup --force
Critical files can be backed up manually or through WHM’s backup interface.
Checking Your OS and cPanel Version
Run the following commands to verify compatibility:
Check your operating system:
cat /etc/redhat-release
- Check your cPanel version:
cat /usr/local/cpanel/version
5. How to Install CloudLinux
Installing CloudLinux on CentOS, AlmaLinux, or RHEL
Step 1: Download the CloudLinux Deployment Script
Download the installer script using wget:
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
Step 2: Run the Installation Script
Execute the script with your CloudLinux license key:
sh cldeploy -k YOUR_LICENSE_KEY
Replace YOUR_LICENSE_KEY with your CloudLinux license key.
Step 3: Reboot the Server
Once the installation completes, reboot your server to activate the CloudLinux kernel:
reboot
Step 4: Verify the Installation
After rebooting, confirm the OS version:
cat /etc/redhat-release
The output should reflect CloudLinux.
Switching CentOS to CloudLinux
For CentOS systems, follow these steps to switch to CloudLinux:
Download and execute the deployment script:
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
bash cldeploy -k YOUR_LICENSE_KEY
- Reboot the server:
reboot
- Verify the switch:
cat /etc/redhat-release
Installing CloudLinux on Ubuntu/Debian (Experimental)
CloudLinux has experimental support for Debian-based systems. Use these steps carefully:
Step 1: Update System Packages
Update and upgrade all packages:
apt update && apt upgrade -y
Step 2: Download and Run Deployment Script
Download the deployment script:
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
Run the installer with your license key:
bash cldeploy -k YOUR_LICENSE_KEY
Step 3: Reboot and Verify
Reboot your server:
reboot
Confirm that CloudLinux is active:
cat /etc/os-release
6. Post-Installation Setup
Verifying Installation
Check the OS version:
cat /etc/redhat-release
- Confirm the kernel:
uname -r
- The output should display a CloudLinux kernel version.
- Log in to WHM and confirm that LVE Manager appears under the Plugins section.
Configuring Key Features
CageFS (Filesystem Virtualization)
Install CageFS:
yum install cagefs -y
- Enable CageFS for all users:
cagefsctl --enable all
- Verify CageFS status:
cagefsctl --status
LVE Manager (Resource Management)
LVE Manager is the core resource allocation tool in CloudLinux. It integrates directly into WHM, allowing you to set limits on:
- CPU
- RAM
- Entry Processes
- Disk I/O
Install LVE Manager:
yum install lvemanager -y
- Access LVE Manager in WHM to configure limits for individual users.
PHP Selector
PHP Selector allows users to select their desired PHP version.
Install alternative PHP versions:
yum groupinstall alt-php
7. Advanced Features of CloudLinux
MySQL Governor
Manages and optimizes MySQL resource usage.
Install MySQL Governor:
yum install governor-mysql -y
- Enable MySQL Governor:
/usr/share/lve/dbgovernor/mysqlgovernor.py --install
8. Troubleshooting Installation Issues
Issue: Deployment Script Fails to Download
Install wget and try again:
yum install wget -y
Issue: Invalid License Key
Make sure the key is correct and active. If issues persist, contact CloudLinux Support.
Conclusion
Installing CloudLinux on your cPanel VPS increases performance, security, and stability, making it a must-have for shared hosting environments. This guide provides every command and detail you need to complete the process seamlessly. For additional resources, visit the CloudLinux documentation.
About the writer
Vinayak Baranwal wrote this article. Use the provided link to connect with Vinayak on LinkedIn for more insightful content or collaboration opportunities.