Centos7yum源修改为国内阿里源

centos7下预置的yum源应用安装及更新比较慢,有时还掉链子,更换到国内的源比较省心,这里以阿里源为例。

进入到源文件目录 cd /etc/yum.repos.d

备份旧的配置文件 mv CentOS-Base.repo CentOS-Base.repo.bak

下载阿里源的文件 wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

清理缓存 yum clean all

重新生成缓存 yum makecache

posted @ 2018-03-18 10:53  liguanzhen  阅读(1389)  评论(0编辑  收藏  举报