首页 > 技术文章 >  CentOS-8.2.2004结束生命周期如何切换源

CentOS-8.2.2004结束生命周期如何切换源

1.CentOS-8.5修改方法

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum clean all && yum makecache

2.CentOS-8.2   CentOS-Base.repo文件内容

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-8.2.2004 - Base - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.2.2004/BaseOS/$basearch/os/
http://mirrors.aliyuncs.com/centos-vault/8.2.2004/BaseOS/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos-vault/8.2.2004/BaseOS/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

#additional packages that may be useful
[extras]
name=CentOS-8.2.2004 - Extras - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.2.2004/extras/$basearch/os/
http://mirrors.aliyuncs.com/centos-vault/8.2.2004/extras/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos-vault/8.2.2004/extras/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-8.2.2004 - Plus - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.2.2004/centosplus/$basearch/os/
http://mirrors.aliyuncs.com/centos-vault/8.2.2004/centosplus/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos-vault/8.2.2004/centosplus/$basearch/os/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

[PowerTools]
name=CentOS-8.2.2004 - PowerTools - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.2.2004/PowerTools/$basearch/os/
http://mirrors.aliyuncs.com/centos-vault/8.2.2004/PowerTools/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos-vault/8.2.2004/PowerTools/$basearch/os/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

此答案有用么?
LiveZilla Live Chat Software