8.2.3. 自动安装安全更新
配置 dnf-automatic 工具以自动下载和安装安全更新。自动化此任务有助于确保您的系统不会受到新发现的威胁,而无需手动干预。
如需更多信息,请参阅您系统上的 dnf-automatic (8) 手册页。
先决条件
- 红帽订阅已附加到主机。
-
dnf-automatic软件包已安装。
流程
在
/etc/dnf/automatic.conf文件中,在[commands]部分,确保将upgrade_type选项被设置为default或security:[commands] # What kind of upgrade to perform: # default = all available upgrades # security = only the security upgrades upgrade_type = security启用并启动 systemd 计时器单元:
# systemctl enable --now dnf-automatic-install.timer
验证
验证计时器是否已启用:
# systemctl status dnf-automatic-install.timer