Why not upgrade the kernel when upgrading yum in centos?

WBOY
Release: 2022-04-14 18:23:51
Original
2824 people have browsed it

Method: 1. Modify the yum configuration file and add "exclude=kernel*" after "[main]"; 2. Use "yum update --exclude "initscripts*,kernel*,centos-release* The "-y" command does not upgrade the kernel.

Why not upgrade the kernel when upgrading yum in centos?

The operating environment of this article: centos 7 system, Dell G3 computer.

How to upgrade the kernel without upgrading yum in centos

When RedHat/CentOS/Fedora uses yum update to update, the kernel will be upgraded by default. However, after upgrading the kernel of some server hardware (especially assembled machines), the new kernel may not recognize certain hardware, and it is very troublesome to reinstall the driver.

So don’t upgrade the kernel easily in a production environment unless you are sure that there will be no troublesome problems after upgrading the kernel.

If you don’t want to upgrade the kernel but only update other software packages, there are two methods:

1. The command for CentOS to upgrade the software without upgrading the kernel is as follows

CentOS7.5/7.6

yum update --exclude "kmod-kvdo*,kernel*,centos-release*" -y
Copy after login

CentOS7.2/7.3/7.4

yum update --exclude "initscripts*,kernel*,centos-release*" -y
Copy after login

CentOS6.8/6.9

yum update --exclude "kernel*,centos-release*" -y
Copy after login

1. Modify the yum configuration file vim /etc/yum.conf, add exclude=kernel*

at the end of [main] or add the following parameters directly after the yum command:

yum –exclude=kernel* update
vi /etc/yum.conf
# 在 [main] 的最后添加:
exclude=kernel*
# 和
exclude=centos-release*
# 按 Esc 键,输入 :wq,然后回车
Copy after login

Recommended tutorial : "centos tutorial"

The above is the detailed content of Why not upgrade the kernel when upgrading yum in centos?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template