There are many articles on the Internet that upgrade the CentOS kernel, such as "CentOS 6.5 upgrade kernel to 3.10.28", most of them are compiled by download source code, a bit of trouble.
In the Elrepo source of Yum, there are 2 kernel versions of mainline (3.13.1), long-term (3.10.28), which are more stable and will be updated for a long time, so choose this version.
1. Import Public key
| 1 |
RPM --import HTTPS://www.elrepo.org/rpm-gpg-key-elrepo.org |
2, install Elrepo to CentOS-6.5
| 1 |
RPM -ivh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm |
3, installation kernel-lt (lt=long-term)
| 1 |
Yum- -Enablerepo=Elrepo-kernel install kernel-lt -y |
or install kernel-ml (ml=mainline)
| 1 |
Yum- -Enablerepo=Elrepo-kernel install kernel-ml -y |
4. Edit the grub.conf file and modify the Grub boot order
| 12345678910111213141516171819202122232425262728 |
# grub.conf generated by Anaconda## Note that you don't have the to rerun grub after making changes to the This file# notice:you does not have a/boot partition. This means# All kernel and INITRD paths is relative to/, eg.# root (hd0,0)# kernel/boot/vmlinuz-version ro root=/dev/sda1# initrd/boot/initrd-[generic-]version.img#boot =/DEV/SDAdefault=0 Timeout=5 splashimage=(hd0,0)/boot/grub/splash. XPM. GZ Hiddenmenutitle CentOS (3.10.28-1.el6.elrepo.x86_64) root (hd0,0) Kernel /Boot/Vmlinuz-3.10.28-1.el6.elrepo.x86_64 RoRoot=Uuid=0a05411f-16f2-< Span class= "CRAYON-CN" >4d69-beb0-2db4cefd3613 rd_no_luks keyboardtype=pc KEYTABLE=us rd_no_md crashkernel< Span class= "Crayon-o" >=auto lang=en_us. Utf-8 RD_NO_LVM rd_no_dm rhgb quiet initrd /boot/Initramfs-3.10.28-1.el6.elrepo.x86_64.img /c14> title CentOS (2.6.32-431.3.1.el6.x86_64) root (hd0,0) Kernel /Boot/Vmlinuz-2.6.32-431.3.1.el6.x86_64 RoRoot=Uuid=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_no_luks keyboardtype=pc keytable=us rd_no_md crashkernel= auto lang=en_US< Span class= "Crayon-sy". utf-8 r D_NO_LVM rd_no_dm rhgb quiet initrd /boot/Initramfs-2.6.32-431.3.1.el6.x86_64.img title CentOS (2.6.32-431.el6.x86_64) root (hd0,0) Kernel /Boot/Vmlinuz-2.6.32-431.el6.x86_64 RoRoot=Uuid=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_no_luks keyboardtype=pc keytable=us rd_no_md crashkernel= auto lang=zh_CN< Span class= "Crayon-sy". utf-8 rd_no _LVM rd_no_dm rhgb quiet initrd /boot/Initramfs-2.6.32-431.el6.x86_64.img |
Confirm the location of the newly installed kernel, then set the default value (starting from 0), generally the newly installed kernel is in the first position, so set default=0.
5. Reboot to see the kernel version number
| 12 |
[root@dev ~]# uname-r 3.10.28-1.el6.elrepo.x86_64 |
Reprinted from Http://ljf.me/archives/use-yum-to-quickly-upgrade-centos-6-5-kernel-3-10-28
Quickly upgrade the CentOS 6.5 kernel to 3.10.28 using Yum