yum安装编译内核
升级前环境:

[[email protected] ~]# uname -a

Linux localhost.localdomain 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

1、导入public key这步必须要执行的

[[email protected] ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
 

2、若只想升级至当前的最新稳定内核,只需要执行下面命令

[[email protected] ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm

CentOS-6.X内核升级

[[email protected] ~]# yum --enablerepo=elrepo-kernel install kernel-lt -y

3、编辑grub.conf文件,修改Grub引导顺序(只需要修改default=0)

[[email protected] ~]# vim /etc/grub.conf

#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
…

CentOS-6.X内核升级 #一般新安装的内核在第一个位置,所以设置default=0,表示启动新内核

4、修改后重启系统

[[email protected] ~]# reboot

重启之后再看系统内核就变成最新的4.4了。

[[email protected] ~]# uname -a

Linux localhost.localdomain 4.4.111-1.el6.elrepo.x86_64 #1 SMP Wed Jan 10 14:56:14 EST 2018 x86_64 x86_64 x86_64 GNU/Linux

相关文章: