CentOS7更换yum为阿里源

1 备份本地源

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

2 获取阿里源配置文件

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

3 更新epel仓库

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

4 更新cache

yum makecache

posted @ 2020-01-01 20:55  s小毛驴  阅读(8410)  评论(0编辑  收藏  举报
返回顶部