Centos内核升级

1:运行安装命令
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


2:查看所有可用内核

cat /boot/grub2/grub.cfg |grep "menuentry " 


3:更换内核

grub2-set-default 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)' 


4:查看内核修改结果

grub2-editenv list 

awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg


5:如果安装完内核后,重启任然未生效

vim /etc/default/grub

将 GRUB_DEFAULT=0

执行 grub2-mkconfig -o /boot/grub2/grub.cfg


6:删除多余内核(可选)

yum remove kernel-3.10.0-693.el7.x86_64

你可能感兴趣的:(Centos内核升级)