openeuler在线自动安装补丁的方法

openeuler操作系统提供dnf-automatic服务用于自动打补丁,当服务器可以正常访问互联网时,使用命令:
sudo dnf install dnf-automatic -y
并修改自动化配置文件sudo vi /etc/dnf/automatic.conf
apply_updates = yes   #自动安装补丁
upgrade_type = security   #只打安全补丁
emit_via = email   #支持邮件通知
启动自动更新:
sudo systemctl enable — now dnf-automatic.timer
即可实现自动检查更新,自动安装更新,自动发通知。
如果需要手动去检查安全补丁,可以使用命令:
sudo dnf update –security
当然以上命令都需要服务器联网才可使用。