CentOS使用yum update更新时不升级内核的方法

warning: 这篇文章距离上次修改已过756天,其中的内容可能已经有所变动。

1、CentOS使用yum update更新时不升级内核

cp /etc/yum.conf    /etc/yum.conf.bak

2、修改yum的配置文件

vi /etc/yum.conf

在[main]的最后添加

exclude=kernel*  
exclude=centos-release*
说明:不要采用低版本中常用的如下方式:yum –exclude=kernel* update
这个命令在Fedora中基本可以用,但是对于 centos-release 的包无法处理。
最后修改于:2022年06月08日 20:49

添加新评论