DocumentationCloudLinux

CloudLinux

Installation

Prerequisites

# Supported OS:
# - CentOS 7, 8
# - AlmaLinux 8, 9
# - Rocky Linux 8, 9
 
# Check current OS
cat /etc/os-release
uname -a

Install CloudLinux

# Install wget if not available
yum install wget -y
 
# Download CloudLinux deployment script
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
 
# Make executable
chmod +x cldeploy
 
# Install CloudLinux with activation key
# Get activation key from https://cln.cloudlinux.com/
./cldeploy -k YOUR_ACTIVATION_KEY
 
# Or register after installation
./cldeploy
# Then activate later: clnreg_gen --help

Post-Installation

# Update system
sudo yum update -y
 
# Convert from hybrid mode (if needed)
# For CentOS 7 to CloudLinux 7
normal-to-hybrid
# Or
normal-to-lve
 
# Verify installation
uname -a
cat /etc/cloudlinux-release
 
# Check CloudLinux kernel
rpm -qa | grep kernel

Service Management

# Start CloudLinux services
sudo systemctl start lve-manager
sudo systemctl enable lve-manager
 
# Check CloudLinux status
sudo systemctl status lve-manager
 
# Check LVE engine
/usr/sbin/lvectl status
 
# View CloudLinux version
cat /etc/cloudlinux-release

User Management

Add Sudo Permissions

# Add sudo permissions to DirectAdmin admin user
/usr/bin/da-addsudoer admin add_user
 
# Add sudo permissions to other users
/usr/bin/da-addsudoer username add_user
 
# Remove sudo permissions
/usr/bin/da-addsudoer username remove_user

LVE (Lightweight Virtual Environment)

LVE Limits

# Check LVE limits
/usr/sbin/lvectl list
 
# Set LVE limits for user
/usr/sbin/lvectl set username --cpu=100 --mem=512M --nproc=50
 
# Set to unlimited
/usr/sbin/lvectl set username --unlimited
 
# Reset to default
/usr/sbin/lvectl reset username
 
# View LVE stats
/usr/sbin/lvectl stat username

LVE Manager Web Interface

# Access LVE Manager
https://server-ip:7080
 
# Login credentials
# Use DirectAdmin admin credentials
 
# Configure:
# 1. Resource limits per user
# 2. LVE modes
# 3. Monitoring dashboard

CageFS

Enable CageFS

# CageFS is installed with CloudLinux
# Enable for all users
/usr/sbin/cagefsctl --enable-all
 
# Enable for specific user
/usr/sbin/cagefsctl --enable username
 
# Disable for specific user
/usr/sbin/cagefsctl --disable username
 
# Disable for all users
/usr/sbin/cagefsctl --disable-all
 
# Check CageFS status
/usr/sbin/cagefsctl --list
 
# Remount CageFS
/usr/sbin/cagefsctl --remount

CageFS Skeleton Directory

# Create CageFS skeleton
mkdir -p /home/cagefs-skeleton
 
# Link to system skeleton
ln -s /home/cagefs-skeleton /usr/share/cagefs-skeleton
 
# Create CageFS directory
mkdir -p /home/cagefs
ln -s /home/cagefs /var/cagefs
 
# Initialize CageFS
/usr/sbin/cagefsctl --init
 
# Update skeleton
/usr/sbin/cagefsctl --update-etc

Security

SELinux Integration

# CloudLinux integrates with SELinux
# Check SELinux status
getenforce
 
# View security events
tail -f /var/log/audit/audit.log

PHP Selector

# View available PHP versions
/usr/bin/cat-php-selector
 
# Set PHP version for user (via DirectAdmin)
1. Admin Panel > Account Manager > Username
2. PHP Version setting
3. Select PHP version
 
# Or via command line
# File: /var/www/username/.htaccess
AddType application/x-httpd-php70 .php

Monitoring & Logging

CloudLinux Console

# Access CloudLinux Console
https://server-ip:7080/c
 
# View:
# - Real-time monitoring
# - LVE statistics
# - Warnings/Alerts
# - Resource usage per user

Check LVE Faults

# View LVE failures
cat /var/log/lve-stats
 
# Check for overages
grep "LIMIT" /var/log/lve-stats | head -20
 
# Count LVE hits
grep "LIMIT" /var/log/lve-stats | wc -l
 
# Top users by LVE faults
awk '{print $11}' /var/log/lve-stats | sort | uniq -c | sort -rn | head -10

Mod_LVE (Apache Module)

Install Mod_LVE

# Install mod_lve for Apache
yum install mod_lve -y
 
# Restart Apache
systemctl restart httpd
 
# Check if loaded
httpd -M | grep lve

Updates & Maintenance

# Update CloudLinux kernel
yum update kernel -y
# Requires reboot
 
# Update CloudLinux tools
yum update cloudlinux-release -y
yum update -y
 
# Check for updates
yum check-update cloudlinux*
 
# Reboot system (if kernel updated)
sudo reboot

Troubleshooting

# Check LVE module loaded
modprobe lve
 
# Check LVE kernel
uname -r | grep lve
 
# Verify CloudLinux installation
rpm -qa | grep cloudlinux
 
# Check LVE status
/usr/sbin/lvectl status
 
# Repair LVE module
/usr/sbin/lvectl remount
 
# Check CloudLinux logs
tail -f /var/log/cloudlinux/main.log
tail -f /var/log/lve-stats
 
# Check for license issues
cat /etc/cloudlinux.license.status

License Management

# Check license status
clnreg_gen --info
 
# Activate license
clnreg_gen --reg-license your-license-key
 
# Reregister
clnreg_gen --reg-force
 
# Check license expiration
cat /etc/cloudlinux.license
 
# View license details
cat /etc/cloudlinux.license.status

Uninstall CloudLinux

# CloudLinux cannot be easily uninstalled
# To convert back to standard OS:
 
# If using CentOS 7 → CloudLinux 7
lve-to-normal
 
# Then reinstall CentOS kernel
yum install kernel-2.6.32-696.el6
 
# Reboot
reboot
 
# Note: This process may require significant time