CentOS, unlike some other distros, will automatically update the kernel when you yum -y update.
In other places you have googled you will find that people have tried adding the following to yum.conf:
This seems to mysteriously work from some people, but not for others. Below is what worked for me.
To prevent this from happening there are a few options:
- CMD Line
yum update --exclude=kernel* redhat-release* centos-release*
- Update yum.conf
Simply add to the bottom of the file (use # to add a comment). Don’t use multiple exclude statements:
# excluding kernel releases from yum automatically updating
exclude=kernel* redhat-release* centos-release*
Good luck and let me know if it works for you and what changes you had to make it order for it to work. By the way, one hint I found is this line in yum.conf:
VERY IMPORTANT NOTE:
If you’re going to install Software Collections Library or any package that has “centos-release” in the name you will have to comment out “centos-release*” from yum.conf and, instead, rely on using the command line above.
Recommendation: comment it out until you’re done doing what you need to do, then remove the comment #.