1. CloudLinux简介
CloudLinux是专为共享主机和云服务提供商设计的商业Linux发行版,基于RHEL/CentOS构建。CloudLinux的核心特性是LVE(Lightweight Virtual Environment)技术,可以隔离每个用户资源使用,防止单个用户占用过多资源影响其他用户。CloudLinux广泛应用于Web主机、云服务器和SaaS平台。更多学习教程www.fgedu.net.cn
CloudLinux的主要特点包括:LVE资源隔离、CageFS安全隔离、PHP Selector多版本PHP、MySQL Governor数据库资源控制、Kernel Care无重启内核更新、与cPanel/Plesk深度集成。
2. CloudLinux版本说明
CloudLinux提供多个版本系列,用户可根据需求选择:
当前稳定版本
CloudLinux OS 10.1:最新稳定版本,2026年发布
CloudLinux OS 9.7:稳定版本
CloudLinux OS 8.10:稳定版本
历史版本
CloudLinux OS 7.9:扩展支持可用
CloudLinux OS 6.10:已弃用
支持的架构
x86_64:Intel/AMD 64位服务器
支持的虚拟化平台
VMware、KVM、Xen、Hyper-V、AWS、Azure等
3. 官方下载方式
CloudLinux需要购买授权才能使用,提供ISO下载和转换安装两种方式。学习交流加群风哥微信: itpux-com
官方下载地址
CloudLinux官网:https://www.cloudlinux.com/
ISO下载:https://www.cloudlinux.com/downloads/
VM镜像:https://images.cloudlinux.com/
ISO镜像下载
https://repo.cloudlinux.com/cloudlinux/10.1/iso/x86_64/CloudLinux-10.1-x86_64-dvd.iso
# CloudLinux 9.7 ISO下载
https://repo.cloudlinux.com/cloudlinux/9.7/iso/x86_64/CloudLinux-9.7-x86_64-dvd.iso
# CloudLinux 8.10 ISO下载
https://repo.cloudlinux.com/cloudlinux/8.10/iso/x86_64/CloudLinux-8.10-x86_64-dvd.iso
使用wget下载
$ wget https://repo.cloudlinux.com/cloudlinux/10.1/iso/x86_64/CloudLinux-10.1-x86_64-dvd.iso
# 输出示例如下:
–2026-04-04 10:15:00– https://repo.cloudlinux.com/cloudlinux/10.1/iso/x86_64/CloudLinux-10.1-x86_64-dvd.iso
Resolving repo.cloudlinux.com… 104.18.32.68
Connecting to repo.cloudlinux.com|104.18.32.68|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 8589934592 (8.0G) [application/octet-stream]
Saving to: ‘CloudLinux-10.1-x86_64-dvd.iso’
CloudLinux-10.1-x86_64-dvd.iso 100%[===========================================>] 8.00G 25.5MB/s in 320s
4. 转换安装方式
CloudLinux支持从现有CentOS/AlmaLinux服务器转换安装,这是最常用的部署方式。from:www.itpux.com
转换安装步骤
$ wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
# 输出示例如下:
–2026-04-04 10:20:00– https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
Resolving repo.cloudlinux.com… 104.18.32.68
Connecting to repo.cloudlinux.com|104.18.32.68|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 51200 (50K) [application/octet-stream]
Saving to: ‘cldeploy’
cldeploy 100%[===========================================>] 50.00K –.-KB/s in 0.1s
# 添加执行权限
$ chmod +x cldeploy
# 使用授权密钥转换
# ./cldeploy -k YOUR_LICENSE_KEY
# 输出示例如下:
Checking for CentOS/AlmaLinux installation…
Detected: AlmaLinux 8.10
Downloading CloudLinux packages…
Installing CloudLinux kernel…
Configuring LVE…
Setting up CageFS…
Conversion completed successfully.
Please reboot the server to complete the installation.
# 使用IP授权转换
# ./cldeploy -i
# 输出示例如下:
Checking for CentOS/AlmaLinux installation…
Detected: CentOS 7.9
IP-based license detected.
Downloading CloudLinux packages…
Installing CloudLinux kernel…
Configuring LVE…
Conversion completed successfully.
Please reboot the server to complete the installation.
5. 安装介质说明
CloudLinux提供多种安装介质,用户可根据实际需求选择。学习交流加群风哥QQ113257174
DVD镜像
文件大小:约8GB
包含内容:完整安装系统
适用场景:全新安装
VM镜像
CloudLinux提供AWS、Azure等云平台的VM镜像。
CloudLinux 10.1 Minimal – Amazon Web Services
CloudLinux 9.7 Minimal – Amazon Web Services
CloudLinux 8.10 Minimal – Amazon Web Services
# 下载地址
https://images.cloudlinux.com/
# 制作启动U盘
# dd if=CloudLinux-10.1-x86_64-dvd.iso of=/dev/sdb bs=4M status=progress && sync
# 输出示例如下:
2048+0 records in
2048+0 records out
8589934592 bytes (8.6 GB, 8.0 GiB) copied, 380.123 s, 22.6 MB/s
6. 系统配置方法
CloudLinux安装后需要进行基本配置,以下是常用配置方法。更多学习教程公众号风哥教程itpux_com
LVE配置
# lveinfo
# 输出示例如下:
ID aCPU mCPU lCPU aMem mMem lMem aIO mIO lIO aIOPS mIOPS lIOPS aEP mEP lEP
1 25 100 100 256M 1G 1G 1024 1024 1024 1024 1024 1024 20 20 20
# 设置用户LVE限制
# lvectl set 1 –cpu=25 –mem=1G –io=1024
# 输出示例如下:
LVE 1 settings updated successfully.
# 查看LVE配置
# lvectl list
# 输出示例如下:
id cpu ncpu io iops mem vmem nproc ep pmem pmemM pio piops maxEntryProcs
1 25 1 25 1024 1G 1G 100 20 0 0 25 1024 0
CageFS配置
# cagefsctl –enable
# 输出示例如下:
CageFS has been enabled.
# 初始化CageFS
# cagefsctl –init
# 输出示例如下:
Creating CageFS skeleton…
Updating CageFS templates…
CageFS initialization completed successfully.
# 为用户启用CageFS
# cagefsctl –enable-user username
# 输出示例如下:
CageFS enabled for user: username
# 查看CageFS状态
# cagefsctl –display-user username
# 输出示例如下:
CageFS status for user: username
Enabled: Yes
Base directory: /usr/share/cagefs-skeleton
7. 系统更新方法
CloudLinux使用yum/dnf进行系统更新。
# dnf update -y
# 输出示例如下:
CloudLinux 10.1 – BaseOS 15 MB/s | 3.0 MB 00:00
CloudLinux 10.1 – AppStream 12 MB/s | 2.5 MB 00:00
CloudLinux 10.1 – Extras 10 MB/s | 500 kB 00:00
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
kernel x86_64 6.6.10-1.el10 updates 45 M
Upgrading:
cloudlinux-release x86_64 10.1-1.el10 updates 15 k
Transaction Summary
================================================================================
Install 1 Package
Upgrade 1 Package
Total download size: 45 M
Downloading Packages:
(1/2): kernel-6.6.10-1.el10.x86_64.rpm | 45 MB 00:02
(2/2): cloudlinux-release-10.1-1.el10.x86_64.rpm | 15 kB 00:00
——————————————————————————–
Total 18 MB/s | 45 MB 00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Upgrading : cloudlinux-release-10.1-1.el10.x86_64 1/2
Installing : kernel-6.6.10-1.el10.x86_64 2/2
Cleanup : cloudlinux-release-10.0-1.el10.x86_64 2/2
Verifying : cloudlinux-release-10.1-1.el10.x86_64 1/2
Verifying : kernel-6.6.10-1.el10.x86_64 2/2
Upgraded:
cloudlinux-release-10.1-1.el10.x86_64
Installed:
kernel-6.6.10-1.el10.x86_64
Complete!
# 使用Kernel Care无重启更新内核
# kcarectl –update
# 输出示例如下:
Downloading patches…
Applying patches…
Kernel updated successfully without reboot.
New kernel security level: 202604041234
8. 生产环境建议
在生产环境中使用CloudLinux时,需要考虑以下因素:
PHP Selector配置
# dnf install cagefs lvemanager php-selector
# 输出示例如下:
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
cagefs x86_64 8.0.10-1 cloudlinux 5.0 M
lvemanager x86_64 10.0.10-1 cloudlinux 2.5 M
php-selector x86_64 5.0.10-1 cloudlinux 500 k
Transaction Summary
================================================================================
Install 3 Packages
Total download size: 8.0 M
Downloading Packages:
(1/3): cagefs-8.0.10-1.x86_64.rpm | 5.0 MB 00:01
(2/3): lvemanager-10.0.10-1.x86_64.rpm | 2.5 MB 00:00
(3/3): php-selector-5.0.10-1.x86_64.rpm | 500 kB 00:00
——————————————————————————–
Total 8.0 MB/s | 8.0 MB 00:01
Complete!
# 安装多个PHP版本
# dnf install php74 php80 php81 php82
# 为用户选择PHP版本
# selectorctl –set-user-current –user=username –version=8.2
# 输出示例如下:
PHP version 8.2 set for user: username
MySQL Governor配置
# dnf install governor-mysql
# 输出示例如下:
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
governor-mysql x86_64 2.0.10-1 cloudlinux 500 k
Transaction Summary
================================================================================
Install 1 Package
Complete!
# 配置MySQL Governor
# /usr/share/lve/dbgovernor/mysqlgovernor.py –install
# 输出示例如下:
Installing MySQL Governor…
Configuring MySQL…
MySQL Governor installed successfully.
# 设置用户数据库限制
# dbctl set username –cpu=25 –mem=512M
# 输出示例如下:
Database limits set for user: username
# 查看数据库使用情况
# dbctl list
# 输出示例如下:
User CPU MEM IO READ WRITE MAX_QUERIES MAX_UPDATES
username 25 512M 25 1000 500 10000 5000
本文由风哥教程整理发布,仅用于学习测试使用,转载注明出处:http://www.fgedu.net.cn/10327.html
