Centos7更换阿里云yum源

备份

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


centos7

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

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


添加EPEL

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


yum clean all

yum makecache


参考资料

http://mirrors.aliyun.com/help/centos

http://mirrors.aliyun.com/help/epel



版权声明:本文为chenhaifeng2016原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。