linux(centos)禁止升级内核的办法

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*

posted @ 2019-12-04 14:58  心向蓝天  阅读(2548)  评论(0编辑  收藏  举报