5ucms论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 3295|回复: 0
打印 上一主题 下一主题

CentOS 升级 yum update 不升级内核版本方法

[复制链接]

670

主题

785

帖子

8253

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
8253
跳转到指定楼层
楼主
发表于 2019-1-14 17:05:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
1.查看操作系统版本

# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

2.执行 yum update 进行升级

# yum update
# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

可以看到系统默认升级到了7.3版本

3.如果不想升级内核及系统版本,则在执行 yum update之前在 /etc/yum.conf 的 [main] 后面添加以下配置

exclude=kernel*
exclude=centos-release*

这样,执行 yum update 后
# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|5ucms.com

GMT+8, 2024-5-20 00:59 , Processed in 0.046875 second(s), 29 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表