centos7更换yum软件源

1.进入yum源目录

cd /etc/yum.repos.d

2.备份原来的文件

mv CentOS-Base.repo CentOS-Base.repo.bak

3.下载新的CentOS-Base.repo文件

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

4.清除缓存

yum clean all

5.生成新的缓存

yum makecache

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: