Search This Blog

Thursday, February 9, 2017

Install Linux Kernel 4.9 In CentOS

Install Linux Kernel 4.9 In CentOS

Ripped from: https://www.ostechnix.com/install-linux-kernel-4-9-centos-ubuntu/ 


To install the latest kernel, we need to add ELRepo repository.

First,  let us add ELRepo GPG key:
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

Then, add ELRepo in CentOS 7 / RHEL 7 / Scientific Linux 7 using command:
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

To Install ELRepo for CentOS 6 / RHEL 6 / Scientific Linux 6:
rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
To Install ELRepo for CentOS 5 / RHEL 5 / Scientific Linux 6:
rpm -Uvh http://www.elrepo.org/elrepo-release-5-5.el5.elrepo.noarch.rpm

Enable ELRepo fastest mirror by installing the following package:
yum install yum-plugin-fastestmirror

Sample output:
Dependencies Resolved

 Package Arch Version Repository
 yum-plugin-fastestmirror noarch 1.1.31-40.el7 base 32 k

Transaction Summary
Upgrade 1 Package

Total download size: 32 k
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for base
yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm | 32 kB 00:02 
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
 Updating : yum-plugin-fastestmirror-1.1.31-40.el7.noarch 1/2 
 Cleanup : yum-plugin-fastestmirror-1.1.31-34.el7.noarch 2/2 
 Verifying : yum-plugin-fastestmirror-1.1.31-40.el7.noarch 1/2 
 Verifying : yum-plugin-fastestmirror-1.1.31-34.el7.noarch 2/2 

 yum-plugin-fastestmirror.noarch 0:1.1.31-40.el7 


We have added the ELRepo. Now, it is time to install Linux kernel 4.9.

Let us find out the current version details with command:
uname -r

Sample output:

So, the currently installed Linux Kernel version is 3.10.0-327.22.2.el7.x86_64.

Now, let us install Linux Kernel 4.9 by running the following command from Terminal:
yum --enablerepo=elrepo-kernel install kernel-ml

After installing the Kernel, Reboot your system and select the latest Kernel from the Grub boot menu.

Once you successfully logged-in to the system, run the following command to verify whether latest the latest Linux Kernel has been installed or not:
uname -r

Sample output:

Congratulations! You have successfully updated the Linux Kernel. Now, your system is powered by most recent stable Linux Kernel 4.9 version.

If have encountered with any problems after installing the new Linux Kernel? No worries, reboot your system. Select your previously working Kernel from the Boot menu.

Finally, remove the newly installed Kernel using command:
yum remove kernel-ml

That’s it.

No comments:

Post a Comment