Linux Kernel is the important part of a computer operating system. Kernel is heart of any computer. A kernel is the most reduced level of effectively replaceable software that interfaces with the hardware in your PC. It is in charge of interfacing the greater part of your applications that are running in “user mode” down to the physical hardware, and permitting processes, known as servers, to get data from each other utilizing between inter-process communication (IPC).
Linux Kernel 3.18.4 Stable Release
Recently latest Kernel 3.18.4 has been released which include lots of changes you can check the all changes from here.
Note :- Before upgrading kernel make sure you have full backup of your important data to another external hard drive. Installing a new kernel may render your system unusable or unstable.
Install Linux Kernel 3.18.4 Stable Release
Now we are going to install latest stable release of Linux Kernel 3.18.4 on our CentOS 7 machine. There are two method to upgrade your kernel on CentOS 7.
1. Using ELrepo
2. Compiling and installing from the source
Upgrade Linux Kernel 3.18.4 Stable Release Using ELrepo
Lets first I am going to upgrade Linux Kernel using ELrepo. To do this first of all you have to download and install ELrepo repo on your system. Follow the below command to install ELrepo.
Download and Install ELrepo
Follow the below command to download and install ELrepo on your system.
# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Update Kernel to 3.18.4 version
After installing ELrepo repository on you system lets install the latest stable kernel 3.18.4 from the ELrepo repository. Follow the below command to do this.
# yum --enablerepo=elrepo-kernel install kernel-ml
Using above command will automatically install the latest Kernel 3.18.4 build for CentOS 7.
Now lets go for the another method to install the latest kernel 3.18.4 by compiling from the source.
Compiling and Installing from the Source
First of all install all dependencies required to compile the Linux kernel but most of the Linux system comes these packages by default.
# yum install gcc ncurses ncurses-devel
Once required packages installed on your system now update your it.
# yum update
Next download the latest and stable release of Linux kernel 3.18.4 using wget command from the official repository of Linux Kernel. You can also download the kernel from the kernel.org website.
# cd /tmp/ # wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.4.tar.xz
Once download is completed now extract the package using below command.
# tar -xf linux-3.18.4.tar.xz -C /usr/src/ # cd /usr/src/linux-3.18.4/
After extracting now configure it using make menuconfig command. Once we’ve executed the below command a pop up window with all the menus appears. Here we can select our new kernel configuration. If you unfamiliar with these menus, just hit double ESC key to exit.
# make menuconfig
Next time the below command If you want to configure your latest kernel with old configuration.
# make oldconfig
Now lets compile the latest kernel 3.18.4 by executing below command. This process will take some time at least 20-30 minutes it depends on your system configuration.
If you got an error such as ” bc command not found” then you can fix that by installing bc using yum command like below:
# yum install bc
Now run the below command to complete process.
Next, after compiling process completed, now we will finally install the Kernel on our Linux system. The below command will create files under /boot directory and also make a new kernel entry in your grub.conf file.
# make modules_install install
Congratulation! latest kernel 3.18.4 has been installed on your Linux system. Now verify it by executing below command.
# uname -r
You will get your kernel version ie. 3.18.4 in the output.