This step-by-step guide covers how to convert your CentOS 8 server to CloudLinux 8 in a DirectAdmin environment, and then configure important CloudLinux features such as Alt-PHP, MySQL Governor, and the LVE Manager (CloudLinux Manager).
Important Notes:
- Always back up your server (files, databases, user data) before converting.
- Ensure you have a valid CloudLinux license key.
- Your server must meet CloudLinux 8 requirements and have a functioning DirectAdmin installation.
1. Preliminary Steps
-
Update your CentOS packages
dnf clean all dnf update -y
-
Reboot if necessary
reboot
This ensures any updated kernel or system libraries are fully loaded.
-
Acquire a CloudLinux license key
If you don’t have a CloudLinux license, purchase one from CloudLinux.com.
2. Convert from CentOS 8 to CloudLinux 8
-
Download the CloudLinux conversion script
cd /root curl -s https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy -o cldeploy chmod +x cldeploy
-
Run the script with your license key
./cldeploy -k YOUR_LICENSE_KEY
Replace
YOUR_LICENSE_KEY
with your actual CloudLinux license key. -
Reboot the server
reboot
Your system should now boot into the CloudLinux kernel.
-
Verify the CloudLinux kernel
uname -r
You should see something like
4.x.x-xxxx.cloudlinux
in the output. -
Check the conversion status
cldetect --detect
This confirms the system is recognized as CloudLinux.
3. Post-Installation Setup in DirectAdmin
3.1 Ensure LVE Manager Plugin is Enabled
-
Install the LVE Manager plugin (if not already installed)
yum install lvemanager
Then, in DirectAdmin, go to Admin Level > Plugin Manager and verify LVE Manager is listed.
-
Enable LVE Manager
In DirectAdmin’s Administrator Settings, check for any CloudLinux or LVE options to ensure they’re active.
-
Restart DirectAdmin
systemctl restart directadmin
4. Install and Configure Alt-PHP
Alt-PHP allows you to provide multiple PHP versions to your users.
-
Install desired Alt-PHP packages
For each PHP version you want:
yum install alt-php74 alt-php74-pear alt-php74-php alt-php74-php-cli alt-php74-php-common -y yum install alt-php80 alt-php80-pear alt-php80-php alt-php80-php-cli alt-php80-php-common -y yum install alt-php81 alt-php81-pear alt-php81-php alt-php81-php-cli alt-php81-php-common -y
-
Enable Alt-PHP in DirectAdmin
Go to Admin Level > LVE Manager (or PHP Version Selector), and confirm the new PHP versions are available.
-
Configure default/selectable PHP versions
Use the Selector tab in LVE Manager to enable or disable specific versions and set default PHP modules and options.
5. Install and Configure MySQL Governor
MySQL Governor manages and limits MySQL resource usage per user.
-
Install MySQL Governor
yum install db-governor
-
Enable it for MySQL
dbgovernor-mysql --install
This may prompt you to align your MySQL/MariaDB version with CloudLinux’s supported builds.
-
Optional: Enable monitoring mode
dbgov_ctl monitor on
This collects usage data without enforcing limits.
-
Switch to enforcement mode
dbgov_ctl enforce on
This actively limits MySQL resources as configured.
-
Configure resource limits
In the LVE Manager under MySQL Governor or in
/etc/sysconfig/db-governor
, set CPU, I/O, and connection limits per user. -
Restart MySQL
systemctl restart mysqld
6. Managing LVE Settings (CloudLinux Manager)
The LVE Manager allows you to fine-tune resource limits for each user or hosting package.
-
Access LVE Manager
In DirectAdmin, look for Admin Level > CloudLinux LVE Manager or Resource Usage.
-
Set default limits
Define CPU, memory, I/O, and other default resource limits for all users.
-
Customize per user
You can override defaults for specific accounts that require more (or fewer) resources.
-
Apply changes
After saving, changes apply immediately or within seconds. Restarting services (like HTTPD or PHP-FPM) may be done if needed.
7. Verifying and Testing
-
Check CloudLinux status
cldetect --detect
It should confirm you’re running CloudLinux.
-
Verify Alt-PHP versions
Log in as a user in DirectAdmin, then check the available PHP versions in the Domain Setup or PHP Selector.
-
Test resource limits
Use a resource-intensive script on a test account to confirm LVE constraints are functioning as intended.
-
Check MySQL Governor
Run
dbgov_ctl status
or review logs in LVE Manager to confirm MySQL usage is being monitored or limited.
8. Routine Maintenance Tips
- Keep packages updated:
yum update -y
regularly. - Monitor your license: Ensure your CloudLinux license is valid and up to date.
- Review resource usage: Adjust LVE limits in LVE Manager as needed.
- Maintain backups: Keep a solid backup strategy for all system data.
- Stay informed: Follow the CloudLinux blog and DirectAdmin forum for updates and best practices.