Add offline disk growth and managed data disks, portable full backups and restore, independent clones and batch instance templates, and local ISO and QCOW2 uploads. Persist task details and metric history in SQLite. Replace hand-drawn host and instance charts with shadcn/ui Chart and Recharts, keep numeric values and units together, and preserve responsive layouts, icons, time ranges and full-sample statistics. Validation: backend tests and vet; Linux KVM/LXC/API/config/server tests; frontend and documentation production builds; real disk, reinstall, backup, clone, upload, task-history and NAT tests; 37 cross-host restore checks; responsive chart checks and read-only deployed verification. Guest Windows restore behavior has not been tested on a running Windows VM.
3.1 KiB
安装
CLICD 提供一键安装脚本。脚本默认安装 GitHub Releases 的最新版本,也可以通过环境变量指定固定版本。
环境要求
- Linux x86_64/amd64 或 ARM64/aarch64 宿主机。
- root 权限。
- systemd。
- 网络可访问 GitHub Release 下载地址。
- 如果要使用 LXC,需要宿主机支持 LXC 运行环境。
- 如果要使用 KVM,需要宿主机开启虚拟化并安装 libvirt/QEMU。
安装最新版本
curl -fsSL https://raw.githubusercontent.com/MengMengCode/CLICD/main/install.sh | sudo sh
安装器会分别询问 LXC 与 KVM 的 NAT 私网网段。直接回车时,脚本会扫描宿主机路由、网卡、网桥和 libvirt 网络,自动选择未冲突的 RFC1918 /24 网段;也可以输入 172.28.40.0/24 这类 CIDR。非交互安装可设置 CLICD_LXC_SUBNET 和 CLICD_KVM_SUBNET。
脚本当前默认使用 CLICD_VERSION=latest,会按宿主架构下载 releases/latest 对应的 clicd-linux-amd64.tar.gz 或 clicd-linux-arm64.tar.gz。
安装指定版本
curl -fsSL https://raw.githubusercontent.com/MengMengCode/CLICD/main/install.sh | sudo CLICD_VERSION=v1.1.6 sh
把 v1.1.6 替换成需要安装的 Release 标签即可。
访问面板
安装完成后,浏览器访问:
http://YOUR_SERVER_IP:8999
首次登录请使用安装脚本输出的管理员账号信息。生产环境建议在防火墙或反向代理层限制访问来源,并尽快修改默认账号和密码。
可选的 KVM 恢复/克隆依赖
KVM 完整恢复、完整克隆和实例模板实例化会使用 virt-customize 离线更新客户机网络身份。安装器在支持 KVM 的架构上按下列顺序尝试安装,并检查该命令是否实际可用:
| 系统 | 候选包 |
|---|---|
| Debian / Ubuntu | guestfs-tools,未提供命令时回退 libguestfs-tools。 |
| RHEL / Rocky / AlmaLinux / Fedora | libguestfs-tools,再尝试 guestfs-tools、libguestfs-tools-c。 |
| Alpine | 尝试 guestfs-tools、libguestfs-tools;仓库/架构不提供时输出明确提示。 |
该依赖缺失不会阻断基本 LXC/KVM 安装,但相应 KVM 恢复/克隆任务会失败,不会跳过身份更新而报告成功。Debian/Ubuntu 的命令由 guestfs-tools 提供;旧版 RHEL 的包名可参照 Red Hat 文档。
command -v virt-customize
virt-customize --version
受管 LXC ext4 loop 磁盘扩容还需要 e2fsck、resize2fs、losetup 和 mount 工具;安装器保留 e2fsprogs 等相关依赖。conntrack 仍用于 NAT 连接跟踪清理,应保留。
卸载
curl -fsSL https://raw.githubusercontent.com/MengMengCode/CLICD/main/install.sh | sudo sh -s -- uninstall
卸载前请确认是否需要保留容器、镜像缓存、数据库和配置文件。