CentOS7 yum设置阿里源

1.备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2.下载新的CentOS-Base.repo 到 /etc/yum.repos.d/

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

3.重新生成缓存

yum makecache

posted @ 2022-09-09 12:27  王子健  阅读(303)  评论(0编辑  收藏  举报