更新内核
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml -y
#yum --enablerepo=elrepo-kernel install kernel-lt-devel kernel-lt -y
#kernel-ml - mainline stable - 稳定主线版本;kernel-lt - long term support - 长期支持版本
删除内核
yum remove $(rpm -qa | grep kernel | grep -v $(uname -r))
#自动获取当前系统中的无用内核(未使用的)并进入卸载
参考:
https://www.zyixinn.com/archives/centos升级内核的三种方式
https://www.cnblogs.com/jykn92/p/15094919.html