CentOS自动打重要安全补丁

# 安装自动打补丁软件
yum install yum-cron yum-plugin-security

————
CentOS7

vi /etc/yum/yum-cron.conf
# 只适用于风险级别Critical
update_cmd = minimal-security-severity:Critical
# 自动打补丁
apply_updates = yes
# 主机名
system_name = centos7
# 邮件发送源/收件人地址
email_from = [email protected]
email_to = root

systemctl enable yum-cron && systemctl start yum-cron

———–
CentOS6

vi /etc/sysconfig/yum-cron
# 只适用于风险级别Critical
YUM_PARAMETER=”–sec-severity=Critical update-minimal”
# 邮件收件人
MAILTO=root
# 主机名
SYSTEMNAME= centos6

chkconfig yum-cron on && servie yum-cron start

====================
PS:
default 默认的更新,类似yum upgrade
security 安全更新, 类似yum –security upgrade
security-severity:Critical 重要的安全更新,类似yum –sec-severity=Critical upgrade
minimal 最小化更新,类似yum –bugfix update-minimal
minimal-security 最小化安全更新,类似yum –security update-minimal
minimal-security-severity:Critical 最小化重要安全更新,类似yum –sec-severity=Critical update-minimal

发表评论

Fill in your details below or click an icon to log in:

WordPress.com 徽标

You are commenting using your WordPress.com account. Log Out /  更改 )

Google photo

You are commenting using your Google account. Log Out /  更改 )

Twitter picture

You are commenting using your Twitter account. Log Out /  更改 )

Facebook photo

You are commenting using your Facebook account. Log Out /  更改 )

Connecting to %s


%d 博主赞过: