第一种方法:

yum -exclude=kernel* update

第二种方法:

在/etc/yum.conf文件中,在[main]加入一行

exclude=kernel* centos-release*

保存