What is the method of updating the system without updating the Linux kernel in CentOS
Today, I will talk to you about the method of updating the system without updating the Linux kernel in CentOS. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something from this article.
Today, when using Ucloud's CVM, I used it cheaply.
The code is as follows:
Yum upgrade-y
And then when I rebooted, my machine couldn't connect.
After communicating with the customer service staff, I found that the kernel could not be updated when it was updated.
In fact, the method is also very simple, just use the following command when updating
The code is as follows:
Yum-y-exclude=kernel\ * upgrade
Or
The code is as follows:
Yum-y-x 'kernel*' upgrade
Of course, it can also be written into the configuration file, once and for all.
The code is as follows:
Vim / etc/yum.conf
Write the following information
The code is as follows:
Exclude=kernel*
It's done, and mom doesn't have to worry about not being able to start up after updating the system.
There are several ways to view the kernel version:
1. Direct cat version information
The code is as follows:
[root@hexuweb102 ~] $cat / proc/version
Linux version 2.6.18-238.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) # 1 SMP Thu Jan 13 15:51:15 EST 2011
two。 Use system commands to view
The code is as follows:
[root@hexuweb102] $uname-a
Linux hexuweb102 2.6.18-238.el5 # 1 SMP Thu Jan 13 15:51:15 EST 2011 x86 "64 GNU/Linux
3. Direct cat version information
The code is as follows:
[root@hexuweb102 ~] $cat / proc/version
Linux version 2.6.18-238.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) # 1 SMP Thu Jan 13 15:51:15 EST 2011
4. Use system commands to view
The code is as follows:
[root@hexuweb102] $uname-a
Linux hexuweb102 2.6.18-238.el5 # 1 SMP Thu Jan 13 15:51:15 EST 2011 x86 "64 GNU/Linux
If you are worried, you can compare to make sure that the kernel version is consistent before and after the update.
After reading the above, do you have any further understanding of the method of updating the system in CentOS without updating the Linux kernel? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.