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

之后就可以正常更新软件、安装软件了。

 

posted @   zed99  阅读(1149)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】
点击右上角即可分享
微信分享提示