1. 程式人生 > >centos7修改yum下載源為阿裏源

centos7修改yum下載源為阿裏源

spa 生成 下載源 目錄 iyu 備份 back ttr sel

在國內很多yum源不好用,所以改成國內的源很有必要

首先,切換到yum源目錄

cd /etc/yum.repos.d

備份一下

sudo mv CentOS-Base.repo CentOS-Base.repo.backup

下載阿裏的源

sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

清理緩存

yum clean all

重新生成緩存

yum makecache

centos7修改yum下載源為阿裏源