系统相关
首页 > 系统相关> > CentOS7.2升级到7.3

CentOS7.2升级到7.3

作者:互联网

前言

最近公司接手一个运维项目,需要将环境搭建起来,但现有的cento系统版本是7.2,而项目的最低要求是7.3,现记录一下升级到指定版本的过程。

过程

  1. 备份旧的版本仓库文件
[root@server-1 yum.repos.d] mkdir -p /etc/yum.repos.d/backup
[root@server-1 yum.repos.d] mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/
  1. 创建要升级到版本的仓库文件
[root@server-1 yum.repos.d] vim /etc/yum.repos.d/CentOS-Base.repo

内容如下

# CentOS Vault contains rpms from older releases in the CentOS-7
# tree.
# C7.3.1611
[C7.3.1611-base]
name=CentOS-7.3.1611 - Base
baseurl=https://vault.centos.org/7.3.1611/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[C7.3.1611-updates]
name=CentOS-7.3.1611 - Updates
baseurl=https://vault.centos.org/centos/7.3.1611/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[C7.3.1611-extras]
name=CentOS-7.3.1611 - Extras
baseurl=https://vault.centos.org/7.3.1611/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[C7.3.1611-centosplus]
name=CentOS-7.3.1611 - CentOSPlus
baseurl=https://vault.centos.org/7.3.1611/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[C7.3.1611-fasttrack]
name=CentOS-7.3.1611 - Fasttrack
baseurl=https://vault.centos.org/7.3.1611/fasttrack/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
[root@server-1 yum.repos.d] yum repolist
[root@server-1 yum.repos.d] yum list updates | grep "centos-release"
[root@server-1 yum.repos.d] yum clean all
[root@server-1 yum.repos.d] rm -rf /var/cache/yum
[root@server-1 yum.repos.d] yum -y update
[root@server-1 yum.repos.d] yum clean all
[root@server-1 yum.repos.d] yum makecache
reboot

后记

标签:CentOS,repos,1611,升级,7.3,yum,CentOS7.2,server
来源: https://blog.csdn.net/qq_36637705/article/details/123066283