home

Rocky Linux security auto update


3671 2026-11-12 04:31:35 dnf update -y

刷新软件包缓存
3672 2026-11-12 04:43:33 dnf makecache

查看当前可用的安全更新
3673 2026-11-12 04:43:44 dnf updateinfo summary --security

应用所有安全更新(推荐)
3674 2026-11-12 04:44:11 dnf upgrade --security
3675 2026-11-12 04:44:34 dnf needs-restarting -r
3676 2026-11-12 04:44:45 init 6
检查是否需要重启系统
3681 2026-11-12 04:45:45 dnf needs-restarting -r

配置自动安全更新
3682 2026-11-12 04:45:54 dnf install dnf-automatic

修改配置文件 /etc/dnf/automatic.conf: 将 upgrade_type 设置为 security,并将 apply_updates 设置为 yes。

启动并启用系统定时器(Timer)
3683 2026-11-12 04:46:13 vi /etc/dnf/automatic.conf
3684 2026-11-12 04:47:02 systemctl enable --now dnf-automatic.timer
3685 2026-11-12 04:47:10 systemctl status dnf-automatic.timer

Exit mobile version