2023-08-03
linux
00
请注意,本文编写于 421 天前,最后修改于 421 天前,其中某些信息可能已经过时。

目录

CentOS 镜像地址:
CentOS8
CentOS6
CentOS7

阿里源地址:https://developer.aliyun.com/mirror/

CentOS 镜像地址:

https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11N4IAnS

CentOS8

shell
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
shell
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

CentOS6

shell
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
shell
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo

CentOS7

shell
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
shell
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

shell
运行 yum makecache生成缓存

其他 非阿里云ECS用户会出现,Couldn’t resolve host ‘mirrors.cloud.aliyuncs.com’信息,不影响使用。用户也可以自行修改相关配置:

shell
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
如果对你有用的话,可以打赏哦
打赏
ali pay
wechat pay

本文作者:YOUWEI

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 ™ 许可协议。转载请注明出处!