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 

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

清除并缓存源:

yum clean all
yum makecache

 

posted @ 2019-03-04 10:13  哈提  阅读(133)  评论(0编辑  收藏  举报