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 = security
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 启用并启动
systemd
计时器单元:systemctl enable --now dnf-automatic-install.timer
# systemctl enable --now dnf-automatic-install.timer
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
验证
验证计时器是否已启用:
systemctl status dnf-automatic-install.timer
# systemctl status dnf-automatic-install.timer
Copy to Clipboard Copied! Toggle word wrap Toggle overflow