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

Thank you! for using Linux Help.

You find this tutorial helpful? Share with your friends to keep it alive.
For more help topics browse our website www.linuxhelp.com
Be the first to comment, we value your suggestions. For further queries please comment below.

Tags: Kernel
user image Author :  Lucas