CentOS8更改软件源为阿里云源

1、备份现有源

cd /etc/yum.repos.d/

mkdir backup

mv *.repo ./backup

2、下载阿里云源文件

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

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo

3、检查以下是否成功

cat /etc/yum.repos.d/CentOS-Base.repo

4、生成缓存

yum makecache

posted @ 2020-10-24 00:08  静悦时光  阅读(720)  评论(0编辑  收藏  举报