2.3. 自动安装安全更新
您可以配置您的系统,使其自动下载并安装所有安全更新。
先决条件
- 红帽订阅附加到主机。
-
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
[commands] # What kind of upgrade to perform: # default = all available upgrades # security = only the security upgrades upgrade_type = securityCopy to Clipboard Copied! Toggle word wrap Toggle overflow 启用并启动
systemd计时器单元:systemctl enable --now dnf-automatic-install.timer
# systemctl enable --now dnf-automatic-install.timerCopy to Clipboard Copied! Toggle word wrap Toggle overflow
验证
验证计时器是否已启用:
systemctl status dnf-automatic-install.timer
# systemctl status dnf-automatic-install.timerCopy to Clipboard Copied! Toggle word wrap Toggle overflow