[centos][yum] centos升级到特定版本
我们已知,yum upgrade命令可以将整个系统升级到最新版本。
但是很多时候,我们需要更新到指定版本,比如,当前最新的CentOS版本是7.6.1810
但是我需要更新到7.4,可以如下这样做:
1. CentOS的repo是不维护历史版本的。所有历史版本都在这里,
在OS里,有这样的一个repo, /etc/yum.repos.d/CentOS-Vault.repo
里边是,当前版本之前的历史版本。所以里边没有7.4 。
2. 更新centos-release包,拿到7,4的vault
yum install centos-release
3 查看所有可用的repo
yum repolist all
详见:
repo id repo name status
C7.0.1406-base/x86_64 CentOS-7.0. - Base disabled
C7.0.1406-centosplus/x86_64 CentOS-7.0. - CentOSPlus disabled
C7.0.1406-extras/x86_64 CentOS-7.0. - Extras disabled
C7.0.1406-fasttrack/x86_64 CentOS-7.0. - Fasttrack disabled
C7.0.1406-updates/x86_64 CentOS-7.0. - Updates disabled
C7.1.1503-base/x86_64 CentOS-7.1. - Base disabled
C7.1.1503-centosplus/x86_64 CentOS-7.1. - CentOSPlus disabled
C7.1.1503-extras/x86_64 CentOS-7.1. - Extras disabled
C7.1.1503-fasttrack/x86_64 CentOS-7.1. - Fasttrack disabled
C7.1.1503-updates/x86_64 CentOS-7.1. - Updates disabled
C7.2.1511-base/x86_64 CentOS-7.2. - Base disabled
C7.2.1511-centosplus/x86_64 CentOS-7.2. - CentOSPlus disabled
C7.2.1511-extras/x86_64 CentOS-7.2. - Extras disabled
C7.2.1511-fasttrack/x86_64 CentOS-7.2. - Fasttrack disabled
C7.2.1511-updates/x86_64 CentOS-7.2. - Updates disabled
C7.3.1611-base/x86_64 CentOS-7.3. - Base disabled
C7.3.1611-centosplus/x86_64 CentOS-7.3. - CentOSPlus disabled
C7.3.1611-extras/x86_64 CentOS-7.3. - Extras disabled
C7.3.1611-fasttrack/x86_64 CentOS-7.3. - Fasttrack disabled
C7.3.1611-updates/x86_64 CentOS-7.3. - Updates disabled
C7.4.1708-base/x86_64 CentOS-7.4. - Base disabled
C7.4.1708-centosplus/x86_64 CentOS-7.4. - CentOSPlus disabled
C7.4.1708-extras/x86_64 CentOS-7.4. - Extras disabled
C7.4.1708-fasttrack/x86_64 CentOS-7.4. - Fasttrack disabled
C7.4.1708-updates/x86_64 CentOS-7.4. - Updates disabled
C7.5.1804-base/x86_64 CentOS-7.5. - Base disabled
C7.5.1804-centosplus/x86_64 CentOS-7.5. - CentOSPlus disabled
C7.5.1804-extras/x86_64 CentOS-7.5. - Extras disabled
C7.5.1804-fasttrack/x86_64 CentOS-7.5. - Fasttrack disabled
C7.5.1804-updates/x86_64 CentOS-7.5. - Updates disabled
C7.6.1810-base/x86_64 CentOS-7.6. - Base disabled
C7.6.1810-centosplus/x86_64 CentOS-7.6. - CentOSPlus disabled
C7.6.1810-extras/x86_64 CentOS-7.6. - Extras disabled
C7.6.1810-fasttrack/x86_64 CentOS-7.6. - Fasttrack disabled
C7.6.1810-updates/x86_64 CentOS-7.6. - Updates disabled
base//x86_64 CentOS- - Base enabled: ,
base-debuginfo/x86_64 CentOS- - Debuginfo enabled: ,
base-source/ CentOS- - Base Sources enabled:
!c7-media CentOS- - Media disabled
centosplus//x86_64 CentOS- - Plus disabled
centosplus-source/ CentOS- - Plus Sources enabled:
cr//x86_64 CentOS- - cr disabled
epel/x86_64 Extra Packages for Enterprise Linux - x86_64 enabled: ,
epel-debuginfo/x86_64 Extra Packages for Enterprise Linux - x86_64 - Debug disabled
!epel-source/x86_64 Extra Packages for Enterprise Linux - x86_64 - Source disabled
epel-testing/x86_64 Extra Packages for Enterprise Linux - Testing - x86_64 disabled
epel-testing-debuginfo/x86_64 Extra Packages for Enterprise Linux - Testing - x86_64 - Debug disabled
epel-testing-source/x86_64 Extra Packages for Enterprise Linux - Testing - x86_64 - Source disabled
extras//x86_64 CentOS- - Extras enabled:
extras-source/ CentOS- - Extras Sources enabled:
fasttrack//x86_64 CentOS- - fasttrack disabled
updates//x86_64 CentOS- - Updates enabled:
updates-source/ CentOS- - Updates Sources enabled:
repolist: ,
4 清空缓存
yum clean all
rm -f /var/cache/yum
5 安装更新
通过对3中repo id的查询,可用使用如下命令,进行全局更新到指定版本
yum --disablerepo='*' --enablerepo='C7.4*' upgrade
6 更新指定软件
yum --disablerepo='*' --enablerepo='C7.4*,epel' update kernel
7 回到正确的release
centos-release是版本标识,我们应该始终保持它指示着正确的信息。
将centos-release包降级回7.4, 之后所有的默认repo便都指向了7.4。
yum --disablerepo="*" --enablerepo="C7.4.1708-*" --enablerepo="epel*" downgrade centos-release
8 常见问题
8.1
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.: . You have an upgrade for systemd-libs which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of systemd-libs of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude systemd-libs.otherarch ... this should give you an error
message showing the root cause of the problem. . You have multiple architectures of systemd-libs installed, but
yum can only see an upgrade for one of those architectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work. . You have duplicate versions of systemd-libs installed already.
You can use "yum check" to get yum show these errors. ...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems). Protected multilib versions: systemd-libs--.el7_4..i686 != systemd-libs--.el7.x86_64
Error: Protected multilib versions: elfutils-libs-0.168-.el7.i686 != elfutils-libs-0.170-.el7.x86_64
Error: Protected multilib versions: libselinux-2.5-.el7.i686 != libselinux-2.5-14.1.el7.x86_64
Error: Protected multilib versions: elfutils-libelf-0.168-.el7.i686 != elfutils-libelf-0.170-.el7.x86_64
Error: Protected multilib versions: pam-1.1.-.el7.i686 != pam-1.1.-.el7.x86_64
Error: Protected multilib versions: nss-softokn-freebl-3.28.-.el7_4.i686 != nss-softokn-freebl-3.36.-.el7_5.x86_64
Error: Protected multilib versions: libsepol-2.5-.el7.i686 != libsepol-2.5-.el7.x86_64
没有解决。。。
[centos][yum] centos升级到特定版本的更多相关文章
- CentOS yum 安装LAMP PHP5.4版本
CentOS yum 安装LAMP PHP5.4版本 [日期:2015-06-04] 来源:Linux社区 作者:rogerzhanglijie [字体:大 中 小] Linux系统版本:C ...
- centos 6.4 升级python到版本2.7.12
注意:需要root权限 查看python版本:python --version 1.下载Python-2.7.12wget https://www.python.org/ftp/python/2.7. ...
- Centos 6.5 升级python到版本2.7.12
查看python版本: python --version 1.下载Python-2.7.12 wget https://www.python.org/ftp/python/2.7.12/Python- ...
- yum-cron更新 CentOS yum update 不升级内核版本方法
http://www.360doc.com/content/15/0608/17/15798950_476597844.shtml 相关yum-cron说明有一些 CentOS yum update ...
- CentOS 6.6 升级GCC G++ (当前最新版本为v6.1.0) (完整)
---恢复内容开始--- CentOS 6.6 升级GCC G++ (当前最新GCC/G++版本为v6.1.0) 没有便捷方式, yum update.... yum install 或者 添加y ...
- CentOS 6.5升级Python后yum不可用的解决方案
因开发需要,今天把CentOS 6.5自带的Python2.6.6升级到了Python2.7.3.按照如下步骤进行升级 1.查看当前系统python的版本 python -V 2.下载2.7.3版本的 ...
- 使用yum快速升级CentOS 6.5内核到 3.10.28
网上有不少升级CentOS内核的文章,如<CentOS 6.5 升级内核到 3.10.28>,大部分都是下载源码编译,有点麻烦. 在yum的ELRepo源中,有mainline(3.13. ...
- CentOS 6下升级Python版本
CentOS6.8默认的python版本是2.6,而现在好多python组件开始只支持2.7以上的版本,比如说我今天遇到的pip install pysqlite,升级python版本是一个痛苦但又常 ...
- 【转】CentOS 6.6 升级GCC G++ (当前最新版本为v6.1.0) (完整)
原文地址:https://www.cnblogs.com/lzpong/p/5755678.html 我这里是centos7 升级到gcc8.1,过程差不多,参考这篇文章,记录一下. ---原文--- ...
随机推荐
- 配置mongo.conf文件
配置mongo.conf文件,优化mongod.exe的启动 在d:/Develop/MongoDB目录下创建mongo.conf文件并写入: dbpath=d:\Develop\MongoDB\ ...
- LODOP条码二维码简短问答及相关博文
LODOP如何输出条码 条码输出 参考样例11 http://www.c-lodop.com/demolist/PrintSample11.html超文本表格中的条码参考样例47 http://www ...
- 常用gem
rails_db better_errors awesome_print web-console irbtools binding_of_caller awesome_rails_console
- 解决ScrollView嵌套百度地图滑动冲突
一.问题描述 scrollview中嵌套百度地图时会出现滑动冲突,地图无法滑动的情况. 二.期望结果 焦点在地图上时,只有地图移动,焦点在地图外部时,可以滑动scrollview. 三.解决方法 自定 ...
- spring security实现记住我下次自动登录功能
目录 spring security实现记住我下次自动登录功能 一.原理分析 二.实现方式 2.1 简单实现方式 2.2 数据库实现方式 三.区分是密码登录还是rememberme登录 spring ...
- 问题三:Appium 的 UIAutomator2 模式下使用 sendKeys 出现错误
在Appium默认的模式下,可以对TextFiled控件进行sendKeys操作: 设置capabilities.setCapability("automationName",&q ...
- python实践项目四:猜数字游戏
题目要求:在1-20中随机生成一个数字,你来猜,只有6次机会. 举例一: #!/usr/bin/python # -*- coding: UTF-8 -*- import random secretN ...
- Python的运算符和编码
1.格式化输出 1.有两种方式: 1.1.%的方式 addr = "我家住在%s" % ("黄土高坡") 1.2.format()的方式 addr = &quo ...
- 『Go基础』第1节 Go语言简介
1. Go语言简介 Go语言起源于2007年, 并于2009年开源. Go语言是一门全新的静态类型开发语言, 具有自动垃圾回收, 丰富的内置类型, 错误处理, 并发编程等特征.
- UI测试用例设计,场景测试法
百度一番,没有发现详细的UI测试用例设计方法,只能自己整理一下,学习.改进. 那么正题来了,我们慢慢缕下思路: 1.整理要测实体中的,处理逻辑.触发规则.动作. 2.将场景测试抽象出来 3.到这个时候 ...