CentOS将yum镜像源修改为阿里云的镜像源

1、备份当前的yum源

mv /etc/yum.repos.d /etc/yum.repos.d.backup

2、下载阿里云的镜像源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

3、清除并生成缓存

yum clean all
yum makecache

生成缓存出问题的请看这里:https://blog.csdn.net/qq_43753724/article/details/116977247?spm=1001.2014.3001.5501

如果提示找不到 yum.repos.d文件夹的话就自己新建个

posted @ 2021-05-18 10:11  别团等shy哥发育  阅读(50)  评论(0)    收藏  举报