CentOS修改yum源

CentOS修改yum源:
1.备份/etc/yum.repos.d/CentOS-Base.repo文件
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.back
2.下载阿里云的Centos-7.repo和epel-7.repo文件
yum -y install wget
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
3.重新加载yum
yum clean all
yum makecache

posted on 2021-09-18 16:59  momingliu11  阅读(120)  评论(0编辑  收藏  举报