Centos7 开启安全更新

  • A+
所属分类:Security

vim  update.sh

#!/bin/sh
#更新epel源
#yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install epel-release -y;
#安装yum-cron
yum install yum-cron -y
#修改yum-cron
sed -i 's/update_cmd = default/update_cmd = security/' /etc/yum/yum-cron.conf
sed -i 's/apply_updates = no/apply_updates =yes/' /etc/yum/yum-cron.conf
systemctl start yum-cron;
systemctl enable yum-cron
avatar

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: