update yum 到指定版本_CentOS系统升级至指定版本

摘要:

CentOS系统下用yum updates命令默认只能升级到最新版本,CentOS仓库并不维护历史版本,所以只能使用 vault.centos.org 历史版本快照进行更新。本文以...

CentOS系统下用yum updates命令默认只能升级到最新版本,CentOS仓库并不维护历史版本,所以只能使用 vault.centos.org 历史版本快照进行更新。也可以用搜狐镜像源更新,

本文以将7.5.1804升级到7.6.1810 ,搜狐镜像源为例。

一、备份服务器上旧的版本Vault仓库文件# mkdir -p /etc/yum.repos.d/backup

# mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/

二、创建要升级到版本(7.6.1810)的repo仓库文件

# vi /etc/yum.repos.d/CentOS-Vault.repo[C7.6.1810-base]

name=CentOS-7.6.1810 - Base

baseurl=http://mirrors.sohu.com/centos/7.6.1810/os/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

enabled=1

[C7.6.1810-updates]

name=CentOS-7.6.1810 - Updates

baseurl=http://mirrors.sohu.com/centos/7.6.1810/updates/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

enabled=1

[C7.6.1810-extras]

name=CentOS-7.6.1810 - Extras

baseurl=http://mirrors.sohu.com/centos/7.6.1810/extras/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

enabled=1

[C7.6.1810-centosplus]

name=CentOS-7.6.1810 - CentOSPlus

baseurl=http://mirrors.sohu.com/centos/7.6.1810/centosplus/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

enabled=1

[C7.6.1810-fasttrack]

name=CentOS-7.6.1810 - Fasttrack

baseurl=http://mirrors.sohu.com/centos/7.6.1810/fasttrack/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

enabled=1

3、查看现在可用仓库列表

# yum repolist

4、查看现在可用仓库版本

# yum list updates | grep "centos-release"

5、清空本地缓存# yum clean all

# rm -rf /var/cache/yum

6、版本升级

# yum -y update

7、查看更新后的版本

# cat /etc/redhat-release

8、备份过渡的repo仓库文件,启用新版的仓库文件# mv /etc/yum.repos.d/CentOS-Vault.repo /etc/yum.repos.d/backup/

# mv /etc/yum.repos.d/CentOS-Vault.repo.rpmnew /etc/yum.repos.d/CentOS-Vault.repo

9、清空本地缓存,更新版本库文件# yum clean all

# yum makecache

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/543667.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Redis过期key清理机制

Redis的key过期时间探讨 说到Redis是一个典型的key-value非关系型数据库,存储的key基本都有过期时间,或者有默认的过期时间,或者不设置的话永久不失效(内存空间足够大的情况下,生产环境一般放置系统的配置参数才这样&a…

错误:使用printf()打印Hello world时未声明'Hello'/ Text

While printing "Hello world", if this error Hello undeclared occurred that means Hello is supplied to the compiler as a variable not as a text/string. 在打印“ Hello world”时 ,如果发生未声明的错误“ Hello” ,则意味着Hello是…

C#中毫米与像素的换算方法

C#中以像素作为尺寸单位,像素是一种相对的尺寸概念,与毫米的转换与当前显示器的分辨率有关。在不同分辨率下转换的系数不同。 借助GDI可以完成毫米至像素的转换。 public static double MillimetersToPixelsWidth(double length) //length是毫米&#xf…

Python | 使用__del __()和__init __()实现析构函数和构造函数的示例

To implement a constructor, we use __init()__ and to implement a destructor, we use __del()__ in python. 为了实现构造函数,我们使用__init()__ ;为了实现析构函数,我们使用python中的__del()__ 。 Program: 程序: class…

drawer的用法_MMDrawerController抽屉侧边栏的简单使用

1.MMDrawerController是一个简单实用的侧边栏第三方类库。2.在appdelegate页中初始化你需要的左右侧边栏,leftViewController ,mainViewController。3.在appdelegate中导入头文件#import "MMDrawerController.h"4.初始化抽屉控制器&#xff1a…

【Android】11.3 屏幕旋转和场景变换过程中GridView的呈现

分类:C#、Android、VS2015; 创建日期:2016-02-21 一、简介 实际上,对于布局文件中的View来说,大多数情况下,Android都会自动保存这些状态,并不需要我们都去处理它。这一节仍以GridView为例&…

foss测试_社区概念-与FOSS社区合作时应遵循的准则

foss测试A steady arrangement of strategies and rules is expected to administer FOSS inside an association. These strategies and rules must be deliberately created to protect that all issues that may influence the interests of the association are tended to.…

74ls161中rco是什么_74ls161引脚图与管脚功能表资料

输入输出CRCPLDEPETD3D2D1D0Q3Q2Q1Q00ФФФФФФФФ00001↑0ФФdcbadcba1↑10ФФФФФQ3Q2Q1Q01↑1Ф0ФФФФQ3Q2Q1Q01↑111ФФФФ状态码加1<74LS161功能表>从74LS161功能表功能表中可以知道&#xff0c;当清零端CR“0”&#xff0c;计数器输出Q3、Q2、Q1、Q0立…

html---textarea初始化时就有个table空格以及tab键操作无效

1 初始化时就有一个tab空格这是由于<textarea></textarea>之间的内容不为空的原因&#xff0c;包含空格和换行&#xff0c;否则浏览器会觉得空格或者换行都是文本域的内容。因此书写时需将<textarea></textarea>紧靠在一起。2 tab键对textarea操作无效…

如何使用JavaScript访问对象的键中有空格的对象?

Sometimes your JavaScript object may contain a key having spaces between them. As a key can also be a string and a string may contain spaces, it is very much possible that you encounter this problem. Consider the following object, 有时&#xff0c;您JavaScr…

python信号量怎么用_Python3.X 线程中信号量的使用方法示例

# -*- coding:utf-8 -*-""" Created by FizLin on 2017/07/23/-下午10:59mail: https://github.com/Fiz1994信号量maxconnections 5...pool_sema BoundedSemaphore(valuemaxconnections)Once spawned, worker threads call the semaphores acquire and releas…

Codeforces Round #343 (Div. 2) A. Far Relative’s Birthday Cake 水题

A. Far Relative’s Birthday Cake题目连接&#xff1a; http://www.codeforces.com/contest/629/problem/A Description Doors family is going celebrate Famil Doorss birthday party. They love Famil Door so they are planning to make his birthday cake weird! The cak…

fedora操作系统优缺点_不同类型的操作系统的优缺点

fedora操作系统优缺点There are following types of Operating systems: 有以下几种操作系统&#xff1a; Batch Operating System 批处理操作系统 Time-Sharing Operating System 分时操作系统 Distributed Operating System 分布式操作系统 Network Operating System 网络操…

python radians函数_Python3 radians() 函数

Python3 radians() 函数描述radians() 方法将角度转换为弧度。语法以下是 radians() 方法的语法:import mathmath.radians(x)注意&#xff1a;radians()是不能直接访问的&#xff0c;需要导入 math 模块&#xff0c;然后通过 math 静态对象调用该方法。参数x -- 一个数值。返…

android decorView详解

摘要 一、DecorView为整个Window界面的最顶层View。 二、DecorView只有一个子元素为LinearLayout。代表整个Window界面&#xff0c;包含通知栏&#xff0c;标题栏&#xff0c;内容显示栏三块区域。 三、LinearLayout里有两个FrameLayout子元素。 (20)为标题栏显示界面。只有一个…

c语言1+2+3+4+5_C程序来计算系列1+(1 + 2)+(1 + 2 + 3)+(1 + 2 + 3 + 4)+ ... +(1 + 2 + 3 + ... + n)...

c语言12345The series is: 1(12) (123) (1234) ... (123...n), we have to find out the sum up to N terms. 该序列是&#xff1a; 1(1 2)(1 2 3)(1 2 3 4) ... (1 2 3 ... n) &#xff0c;我们有找出N个项之和。 Solution: 解&#xff1a; We know the sum of n…

3dmax批量导入obj_ArcGIS 与 3DMax 结合建模

整体技术思路是将项目区二维的CAD测绘底图&#xff0c;通过整理导入到3DMax中&#xff0c;根据CAD底图为基础&#xff0c;绘制三维数字模型。利用Photoshop 平面图像处理软件&#xff0c;对现场采集的照片进行修整&#xff0c;为三维模型制作表面贴图。最终把贴好材质的三维楼体…

iOS对象属性详解

oc对象的一些属性&#xff1a; retain,strong, copy,weak,assign&#xff0c;readonly, readwrite, unsafe_unretained下面来分别讲讲各自的作用和区别&#xff1a;retain&#xff0c;计数器加1&#xff0c; (增加一个指向内存的指针) 对应release&#xff08;计数器&#xff0…

给定一个由n个数字组成的数组,请检查是否存在重复项

This is a searching problem which can be solved using brute force approach. But here we are going to see use of hash table to solve such searching problems at lower time complexity. 这是一个搜索问题&#xff0c;可以使用蛮力方法解决。 但是在这里&#xff0c;我…

字符串乘一个数_【思维拓展】三位数乘两位数,构造最大积和最小积

前面袁老师给大家讲了一个重要结论&#xff0c;并运用这个结论来解决问题&#xff0c;构造两位数乘两位数最大积和最小积的问题。今天&#xff0c;更进一步&#xff0c;三位数乘两位数中&#xff0c;如何构造最大积和最小的积&#xff1f;【问题引入】用9、8、6、5、4这五个数字…