linux系统如果升级内核,会造成不可预估的问题,因此有必要禁止自动升级内核,方法如下
yum -y install yum-cron
#关闭自动更新
vi /etc/yum/yum-cron.conf
update_messages = no
download_updates = no
#启动yum-cron
systemctl start yum-cron
systemctl enable yum-cron
#忽略更新内核
cp /etc/yum.conf /etc/yum.conf.bak
vi /etc/yum.conf
exclude=kernel*
exclude=centos-release*