Use yum to quickly upgrade the CentOS 6.5 kernel to the latest version
Original address: http://www.tuicool.com/articles/rUvERv
In the ELRepo source of yum, there are two kernel versions, main line (3.13.1) and long-term (3.10.28). Considering that long-term is more stable, it will be updated for a long time, so choose this version .
1. Import public key
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
2. Install ELRepo to CentOS-6.5
rpm -ivh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm
3、安装 kernel-lt(lt=long-term)
yum --enablerepo=elrepo-kernel install kernel-lt -y
Or install kernel-ml (ml=mainline)
yum --enablerepo=elrepo-kernel install kernel-ml -y
4. Edit the grub.conf file and modify the Grub boot order
vim /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/vda3
# initrd /initrd-[generic-]version.img
#boot=/dev/vda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (4.8.12-1.el6.elrepo.x86_64)
root (hd0,0)
kernel /vmlinuz-4.8.12-1.el6.elrepo.x86_64 ro root=UUID=97fbe540-c883-4463-b94f-78157cd99ac8 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-4.8.12-1.el6.elrepo.x86_64.img
title CentOS (3.10.104-1.el6.elrepo.x86_64)
root (hd0,0)
kernel /vmlinuz-3.10.104-1.el6.elrepo.x86_64 ro root=UUID=97fbe540-c883-4463-b94f-78157cd99ac8 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-3.10.104-1.el6.elrepo.x86_64.img
title CentOS (2.6.32-642.11.1.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-642.11.1.el6.x86_64 ro root=UUID=97fbe540-c883-4463-b94f-78157cd99ac8 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-642.11.1.el6.x86_64.img
title CentOS 6 (2.6.32-573.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-573.el6.x86_64 ro root=UUID=97fbe540-c883-4463-b94f-78157cd99ac8 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-573.el6.x86_64.img
Confirm the location of the newly installed kernel, and then set the default value (starting from 0). Generally, the newly installed kernel is in the first location, so set default=0.
5. Restart and check the kernel version number
[root@dev ~]# uname-r
4.8.12-1.el6.elrepo.x86_64