Centos7 修改yum源为阿里镜像源

最近项目中需要把yum源换为国内阿里镜像源,特此记录便于日后查阅。

cd /etc/yum.repos.d
mv ./CentOS-Base.repo ./CentOS-Base.repo.bak
mv ./epel-7.repo ./epel-7.repo.bak
wget http://mirrors.aliyun.com/repo/Centos-7.repo
wget https://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache
yum update

到此 Centos7 修改yum源为阿里镜像源介绍完成。

你可能感兴趣的:(Linux,centos)