(This method is limited to the CentOS faction's yum/rpm.) Supplement: limited to 64Bit. CentOS7 32-bit, I tried to use CentOS6 32-bit kernel to upgrade, can be upgraded to use the restart can be used, half an hour after the deletion of the system no longer try to use, so do not know what will bring bad experience. )
The way to upgrade the kernel of CentOS and Debian has been mentioned in the previous logs.
Self-compiled kernel: Upgrade kernel to current stable version 4.4.1
This is a quicker way to install a compiled kernel directly from Yum, with just a few commands
# RPM--import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
This step has to be performed, to get the key.
To upgrade to the current stable kernel only, you need to perform the following two commands
# yum Install-y http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm//Add source
# yum--enablerepo=elrepo-kernel install-y kernel-ml//Install the current kernel, then upgrade the kernel to run this sentence directly
You can also use the following methods if you want to upgrade only the specified kernel, or because you cannot access the source address.
First find the desired kernel in the following two URLs.
1, http://elrepo.reloumirrors.net/kernel/el7/x86_64/RPMS///official source
2, http://hkg.mirror.rackspace.com/elrepo/kernel/el7/x86_64/RPMS///Hong Kong Mirror, the latest version will be delayed 1, 2 days than the official website
The current version shown in the figure above is kernel-ml-4.5.2-1.el7.elrepo.x86_64.rpm (MainLine = ml),
The link address is: http://hkg.mirror.rackspace.com/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-4.5.2-1.el7.elrepo.x86_64.rpm (Hong Kong speed relatively faster)
# yum Install-y http://hkg.mirror.rackspace.com/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-4.5.2-1.el7.elrepo.x86_64.rpm
After upgrading the kernel, automatically start with the latest kernel, modify the following files
# Vi/etc/default/grub
Modify into Grub_default=0
# Grub2-mkconfig-o/BOOT/GRUB2/GRUB.CFG//Recompile kernel boot file, then upgrade the kernel to execute once
Delete old kernel
# Rpm-qa | grep kernel
# yum Autoremove kernel-3.10.0-327.13.1.el7.x86_64
Article Source: https://blog.janfou.com/technical-documents/11220.html
Reference:
http://endle.github.io/2014/01/30/centos-new-linux-kernel/
Http://blog.sina.com.cn/s/blog_4673e6030102v9og.html
http://elrepo.org/tiki/tiki-index.php