2022 centos8.3 配置国内yum源
最近安装centos8.3 按照百度配置阿里云出错如下:
Errors during downloading metadata for repository 'baseos':
- Status code: 404 for https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 39.96.118.192)
Error: Failed to download metadata for repo 'baseos': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
之后安装yum配置里地址上去 发现centos8终止支持之后将之前yum源中的文件删除了 需要去 http://mirrors.aliyun.com/centos-vault/找到对应的yum文件
具体配置如下
# 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-$releasever - Base - mirrors.aliyun.com
#failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/BaseOS/x86_64/os/
gpgcheck=0
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
#failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/extras/x86_64/os/
gpgcheck=0
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
#failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/centosplus/x86_64/os/
gpgcheck=0
enabled=1
[PowerTools]
name=CentOS-$releasever - PowerTools - mirrors.aliyun.com
#failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/PowerTools/x86_64/os/
gpgcheck=0
enabled=1
[AppStream]
name=CentOS-$releasever - AppStream - mirrors.aliyun.com
#failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/AppStream/x86_64/os/
gpgcheck=0
之后就可以正常更新软件、安装软件了。