Install Kernel by default on CentOS 7 images

All the images we offer at Clouding.io are manufactured by us and we adapt them so that they work 100% with our platform. That is why, in certain ways at the level of operating systems, we have to make a series of additional setups.

Due to these changes, it is possible that when certain software is installed, some type of error happens, since another version of the kernel was expected. We use a kernel that is newer than the distribution itself. To go back to the previous kernel (and the official one from the distribution) a kernel downgrade has to be carried out to go down to version 3.10.

The first thing is to activate the CentOS repo base:

vi /etc/yum.repos.d/CentOS-Base.repo

And at the end of everything we add the following:

enabled=1

Then we move the Clouding repo:

mv /etc/yum.repos.d/CentOS-clouding.repo /etc/yum.repos.d/CentOS-clouding.disable

We update repo, and clean cache:

 yum update yum clear all rm -rf /var/cache/yum 

And then we install the following packages:

yum install kernel-devel kernel

Now we restart the server and we have to go to the VNC Console and select the 3.10 kernel. Now if we execute uname -r it should go out: 3.10.0-693.el7.x86_64.

Then we remove the kernel 3.14:

yum remove kernel-3.14.43_1-2.x86_64 kernel-devel-3.14.43_1-2.x86_6 kernel-headers-3.14.43_1-2.x86_64

And, eventually, we update the Grub:

grub2-mkconfig -o /etc/grub2.cfg

From now on our Centos 7 image will always start with kernel 3.10.0 and we can compile or install the needed software.

To write a comment on this article, fill out the form below. Fields marked with an asterisk (*) are required.