[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,过程差不多,参考这篇文章,记录一下. ---原文--- ...
随机推荐
- 【翻译】Flink Table Api & SQL — Catalog Beta 版
本文翻译自官网:Catalogs Beta https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/table/catalog ...
- 【Python学习之五】函数
环境 虚拟机:VMware 10 Linux版本:CentOS-6.5-x86_64 客户端:Xshell4 FTP:Xftp4 python3.6 Python不但能非常灵活地定义函数,而且本身内置 ...
- .net core在Linux本地化Localization的一次填坑
使用ABP框架开发.net core程序已经有一段时间了,因为之前部署在windows服务器上,使用一直很正常.自从前段时间切换服务器上了Linux的Centos服务器,发现之前中文的语言变成了英文, ...
- MAX10 ADC的一些基知识
MAX10 ADC 的一些知识 1. MAX 10 内部集成的12bit SAR ADC的特点为: a. 采样速率高达1Mhz. b. 模拟通道多达18个,单 ...
- QT笔记-QlineEdit
1 QlineEdit 2 案例 构造一个用户登录界面,输入用户名密码,点击确定以后检查是否正确 (1)布局 注意事项:先拖动Label--->然后Line Edit---->按住ctrl ...
- 密钥密码体系CA,CSC,CV
密钥密码体系CA,CD,CSC,CV 片内操作系统 (cos) 密码学(Cryptography) 非接触式智能卡Contactless Smart Card, CSC 密钥名词 名词 英文说明 中文 ...
- js 打印条形码
相应的文件大家去github上下载吧 https://github.com/lindell/JsBarcode <!DOCTYPE html> <html> <head& ...
- Jmeter接口测试自动化(jmeter+ant+jenkins持续集成)
Jmeter是压力测试.接口测试工具,Ant是基于Java的构建工具,具有跨平台的作用,jenkins是持续集成工具.将这三者结合起来可以搭建一套webservice接口测试的持续构建环境. 1. ...
- Django实现博客项目
一.项目概述 项目运行环境 Python3.6+ Django 1.11 MySQL 5.7 其他插件(图片处理.分页.验证码....) 项目详细功能介绍 前台功能 项目首页展示 轮播图 博客推荐 最 ...
- Springboot采用hibernate-validate验证请求参数
在springboot项目使用hibernate-validate对请求参数添加注解进行校验 常用注解 @Null,标注的属性值必须为空 @NotNull,标注的属性值不能为空 @AssertTrue ...