How to update Kernel version on Centos 7

To update latest kernel version on Centos 7

Linux kernel is one of the largest open source project with upgrading versions. Updating the latest kernel version on Centos 7 is explained in this manual.

Check the current kernel version using the following command.

[root@linuxhelp ~]# uname -r
3.10.0-123.el7.x86_64

Add the EPEL GPG key to enable the EPEL repository and EPEL repo fastest mirror using the below command.

[root@linuxhelp ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

Before installation process enable the epel repo using following command.

[root@linuxhelp ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Retrieving http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:elrepo-release-7.0-2.el7.elrepo  ################################# [100%]

Now enable the epel repo’ s fastest mirror using below command.

[root@linuxhelp ~]# yum install yum-plugin-fastestmirror -y
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
 * base: centos.webwerks.com
 * elrepo: mirrors.thzhost.com
 * extras: centos.webwerks.com
 * updates: centos.webwerks.com
Resolving Dependencies
-->  Running transaction check
--->  Package yum-plugin-fastestmirror.noarch 0:1.1.31-24.el7 will be updated
--->  Package yum-plugin-fastestmirror.noarch 0:1.1.31-34.el7 will be an update
-->  Finished Dependency Resolution
.
.
.
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
 Userid     : " CentOS-7 Key (CentOS 7 Official Signing Key) < security@centos.org> " 
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-0.1406.el7.centos.2.3.x86_64 (@anaconda)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Updating   : yum-plugin-fastestmirror-1.1.31-34.el7.noarch                                                                                                                   1/2 
  Cleanup    : yum-plugin-fastestmirror-1.1.31-24.el7.noarch                                                                                                                   2/2 
  Verifying  : yum-plugin-fastestmirror-1.1.31-34.el7.noarch                                                                                                                   1/2 
  Verifying  : yum-plugin-fastestmirror-1.1.31-24.el7.noarch                                                                                                                   2/2 

Updated:
  yum-plugin-fastestmirror.noarch 0:1.1.31-34.el7                                                                                                                                  

Complete!

Start to install the latest kernel version.

[root@linuxhelp ~]# yum --enablerepo=elrepo-kernel install kernel-ml -y
Loaded plugins: fastestmirror, langpacks 
Loading mirror speeds from cached hostfile
 * base: centos.webwerks.com
 * elrepo: mirrors.thzhost.com
 * elrepo-kernel: mirrors.thzhost.com
 * extras: centos.webwerks.com
 * updates: centos.webwerks.com
Resolving Dependencies
-->  Running transaction check
--->  Package kernel-ml.x86_64 0:4.7.0-1.el7.elrepo will be installed
-->  Finished Dependency Resolution
.
.
.
Downloading packages:
kernel-ml-4.7.0-1.el7.elrepo.x86_64.rpm                                                                                                                     |  39 MB  00:09:12     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : kernel-ml-4.7.0-1.el7.elrepo.x86_64                                                                                                                             1/1 
  Verifying  : kernel-ml-4.7.0-1.el7.elrepo.x86_64                                                                                                                             1/1 

Installed:
  kernel-ml.x86_64 0:4.7.0-1.el7.elrepo                                                                                                                                            

Complete!

After the installation completes, reboot the system to use newer kernel version using the following command.

[root@linuxhelp ~]# uname -r
4.7.0-1.el7.elrepo.x86_64
Tag : Kernel
FAQ
Q
What happened to ftp.kernel.org?
A
FTP service was terminated on March 1, 2017. All content that used to be available via ftp.kernel.org can be accessed by browsing https://www.kernel.org/pub/. If you would like to use a comma
Q
When will the next kernel be released?
A
The next kernel will be released when it is ready. There is no strict timeline for making releases, but if you really need an educated guess, visit the Linux kernel PHB Crystal Ball -- it tri
Q
Why is an LTS kernel marked as "stable" on the front page?
A
Long-term support ("LTS") kernels announced on the Releases page will be marked as "stable" on the front page if there are no other current stable kernel releases. This is done to avoid break
Q
Where can I find kernel 2.4.20-3.16?
A
Kernel version numbers of this form are distribution kernels, meaning they are modified kernels produced by distributions. Please contact the relevant distributor; or check out https://mirror
Q
What is the use of making kernel update?
A
Linux kernel is one of the largest open source project with upgrading versions.