Ubuntu 上 Cobbler 的更新与升级指南
一 更新策略与准备
二 使用 APT 的日常更新
sudo apt update
sudo apt upgrade cobbler cobbler-web tftp-server dhcp httpd
sudo systemctl restart cobblerd
sudo systemctl restart httpd # 或:sudo systemctl restart apache2
cobbler check
sudo cobbler sync
三 跨版本升级 Cobbler
sudo cp -a /etc/cobbler /etc/cobbler.bak_$(date +%F)
sudo apt install -y build-essential python3-dev libapache2-mod-wsgi-py3 libssl-dev
wget https://github.com/cobbler/cobbler/archive/refs/tags/v3.3.5.tar.gz
tar xf v3.3.5.tar.gz -C /usr/src
cd /usr/src/cobbler-3.3.5
./configure --with-python3 --with-apache2
make
sudo make install
sudo systemctl restart cobblerd
sudo systemctl restart httpd # 或 apache2
cobbler --version
sudo cobbler sync
四 被部署 Ubuntu 系统的更新与升级
sudo apt update && sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt autoremove -y && sudo apt autoclean
sudo reboot
sudo apt install -y update-manager-core
# 编辑 /etc/update-manager/release-upgrades,Prompt=lts 或 normal
sudo do-release-upgrade -c # 检查可升级版本
sudo do-release-upgrade # 执行升级,按向导完成
sudo reboot
五 升级后验证与常见问题处理
cobbler check
sudo cobbler sync
sudo systemctl status cobblerd
sudo systemctl status httpd # 或 apache2
journalctl -u cobblerd -f
tail -f /var/log/syslog
sudo systemctl restart cobblerd
sudo cobbler sync