[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,过程差不多,参考这篇文章,记录一下. ---原文--- ...
随机推荐
- LODOP中无规律无法还原偶尔出现问题排查
一些问题无法还原且偶尔出现,没法通过做例子来展示问题,为了找到问题在哪里,就需要排查定位问题 .由于这些问题偶尔出现,且无规律,出现频率低,所以只能不断通过各种对比测试,定位排查到问题和什么有关.如果 ...
- vue -- router路由跳转错误 , NavigationDuplicated
vue-router ≥3.0版本回调形式以及改成promise api的形式了,返回的是一个promise,如果路由地址跳转相同, 且没有捕获到错误,控制台始终会出现如图所示的警告 (注:3.0以下 ...
- [LeetCode] 3.Longest Substring Without Repeating Characters 最长无重复子串
Given a string, find the length of the longest substring without repeating characters. Example 1: In ...
- vue-cli3 每次打包都改变css img js文件名,还有自带版本号
let Version = new Date().getTime(); css: { // 是否使用css分离插件 ExtractTextPlugin extract: { //一种方式,打包后的cs ...
- 在ensp上的mstp基础配置
为什么需要mstp? 因为stp中存在阻塞端口,阻塞后不承载流量,造成了带宽浪费 实验模拟 实验拓扑 相关参数 首先我们在交换机上创建vlan 10,20 设置端口 默认是运行mstp服务看一下
- linux-pdb命令行下python断点调试工具
一般地,我们可以使用如下的方式进入调试(比如我们要调试的源文件为hello.py): 1. 在命令行启动目标程序,加上-m参数. python -m pdb hello.py 这样程序会自动停在第 ...
- Docker部署ELK 7.0.1集群之Logstash安装介绍
1.下载镜像 [root@vanje-dev01 ~]# docker pull logstash: 2.安装部署 2.1 创建宿主映射目录 [root@vanje-dev01 ~]# mkdir ...
- SAS学习笔记61 set和union的区别
好久没发博客了,水一篇,直接来代码 set的结果如下 union的结果如下
- asp.net Code CSRedis学习记录
1.安装Redis for windows 安装地址 https://github.com/MicrosoftArchive/redis/releases Redis 是完全开源免费的,遵守BSD协议 ...
- subprocess.popen.kill杀死所有子进程
一.使用subprocess模块 使用subprocess模块可创建子进程. subprocess. Popen ( args , bufsize=0 , executable=None , stdi ...