HOW TO UPDATE LINUX KERNEL VERSION IN RHEL/CENTOS 7
Introduction
In this article we are going to discuss on How to Upgrade/Update latest Linux Kernel Version in RHEL/CentOS 7. Before that let’s understand what is Kernel. Kernel is nothing but a base of any operating system or we can say core part of a operating system. It’s interact with your all Hardware devices like Motherboard, Hard-disks, System Memory, I/O devices like Keyboard, Mouse..etc and manage it. As we know that BIOS (Basic Input/Output System) which is responsible for initialize all hardware and load the kernel in to system memory and Kernel is the first program starts at system startup by loading in to memory then starts the Operating System and then start all services.
CentOS 7 comes with Kernel Version 3.10.0-229.el7.x86_64. Let’s Upgrade the kernel to Latest version for new updates, Features and make the system performance more better.
We have to use Third party community application i.e. ELRepo to update the kernel in RHEL/CentOS 7 as by default Redhat/CentOS don’t allow to update the kernel version. ELRepo is a community which creates updated stable kernel, Hardware Firmware’s and drivers ( for eg: Graphic Card, LAN Card, Sound Card..etc.) and other packages.
Also Read :
HOW TO CONFIGURE BASIC AUTHENTICATION IN APACHE WEB SERVER
HOW TO CONFIGURE XRDP REMOTE DESKTOP SERVER IN RHEL/CENTOS 7
Follow the below Steps to Update Linux Kernel Version
To check the current kernel version we can use uname command. As shown on the out put below currently we have installed the operating system with Kernel Version 3.10.0-229.el7.x86_64.
[root@localhost ~]# uname -r # To check the Kernel Version
3.10.0-229.el7.x86_64
Step : 1 Install Required Packages
To update the Linux Kernel Version we have to RPM GPG Key, So follow the below command to do the same.
[root@localhost ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org # To Import RPM GEG Key
Now Install ELRepo third-party community package which will help us to update the kernel to latest version. So refer the below command to install the elrepo-release package.
Note : By-Default RHEL/CentOS 7 don’t allows to update the kernel version.
[root@localhost ~]# yum -y install "http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm" # Install and Enable ELRepo Package
Loaded plugins: fastestmirror, langpacks
elrepo-release-7.0-2.el7.elrepo.noarch.rpm | 8.4 kB 00:00
Examining /var/tmp/yum-root-hT5s6h/elrepo-release-7.0-2.el7.elrepo.noarch.rpm: elrepo-release-7.0-2.el7.elrepo.noarch
Marking /var/tmp/yum-root-hT5s6h/elrepo-release-7.0-2.el7.elrepo.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package elrepo-release.noarch 0:7.0-2.el7.elrepo will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
elrepo-release
noarch 7.0-2.el7.elrepo /elrepo-release-7.0-2.el7.elrepo.noarch 5.2 k
Transaction Summary
================================================================================
Install 1 Package
Total size: 5.2 k
Installed size: 5.2 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : elrepo-release-7.0-2.el7.elrepo.noarch 1/1
Verifying : elrepo-release-7.0-2.el7.elrepo.noarch 1/1
Installed:
elrepo-release.noarch 0:7.0-2.el7.elrepo
Complete!
Step : 2 Install Latest Stable Linux Kernel Version
As we can see on the output above we successfully installed the latest version of elrepo-release package, Now let’s go ahead and install Latest linux kernel version by using below command.
[root@localhost Desktop]# yum -y --enablerepo=elrepo-kernel install kernel-ml # Install Latest Stable Linux Kernel Version
Loaded plugins: fastestmirror, langpacks
elrepo-kernel | 2.9 kB 00:00
elrepo-kernel/primary_db | 1.7 MB 00:06
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* elrepo: ftp.colocall.net
* elrepo-kernel: ftp.colocall.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Resolving Dependencies
--> Running transaction check
---> Package kernel-ml.x86_64 0:4.10.1-1.el7.elrepo will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
kernel-ml x86_64 4.10.1-1.el7.elrepo elrepo-kernel 40 M
Transaction Summary
================================================================================
Install 1 Package
Total download size: 40 M
Installed size: 183 M
Downloading packages:
kernel-ml-4.10.1-1.el7.elrepo.x86_64.rpm | 40 MB 01:14
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : kernel-ml-4.10.1-1.el7.elrepo.x86_64 1/1
Verifying : kernel-ml-4.10.1-1.el7.elrepo.x86_64 1/1
Installed:
kernel-ml.x86_64 0:4.10.1-1.el7.elrepo
Complete!
Latest linux kernel i.e. kernel-ml.x86_64 0:4.10.1-1.el7 installed successfully, now reboot the system to check and confirm the Linux Kernel Version.
[root@localhost ~]# reboot
Step : 3 Confirm the Updated Kernel Version
After reboot the system as usual you will able to see the below screen at system startup which is showing that our linux kernel has been updated to version : 4.10.1-1.el7.elrepo.x86_64. Just select the updated Kernel which is highlighted below and Press ENTER.
After login the Operating System open the terminal and run the below command to check the latest linux kernel version.
[root@localhost ~]# uname -r # Check Linux Kernel Version
4.10.1-1.el7.elrepo.x86_64
Also you can use the below command to check kernel version.
[root@localhost ~]# uname -a
Linux localhost.localdomain 4.10.1-1.el7.elrepo.x86_64 #1 SMP Sun Feb 26 19:47:48 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
So This is how we can update the Latest Stable Linux Kernel Version in RHEL/CentOS 7 .
If you found this article useful then Like Us, Share Us, Subscribe our Newsletter OR if you have something to say then feel free to comment on the comment box below.