CentOS Stream 8 版本更新与维护指南
一、日常软件包更新
sudo dnf check-updatesudo dnf update -ysudo dnf update kernel -y && sudo rebootsudo dnf clean all二、跨小版本的“版本切换”与同步
cat /etc/centos-releasesudo dnf distro-sync -ysudo reboot三、从 CentOS Linux 8 切换到 CentOS Stream 8
sudo dnf install -y centos-release-streamsudo dnf swap -y centos-{linux,stream}-repossudo dnf distro-sync -ysudo rebootcat /etc/centos-release 应显示 CentOS Stream release 8四、从 CentOS Stream 8 升级到 CentOS Stream 9
sudo dnf -y --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync五、自动化与安全建议
/etc/yum/yum-cron.conf,设置 enabled=1、daily_updates=1、update_cmd=distro-syncsudo systemctl enable --now yum-cron--best 或 --allowerasing,并在非生产环境先行验证。