Centos7.4 更换国内yum源

1.进入yum源配置文件夹。cd /etc/yum.repos.d



2.备份一下之前的配置文件。mv ./CentOS-Base.repo ./CentOS-Base.repo.bak


3.下载网易163源。wget http://mirrors.163.com/.help/CentOS6-Base-163.repo


4.把CentOS-Base-163.repo设置为默认源 mv CentOS6-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo


5.运行yum makecache生成缓存即可。yum makecache


猜你喜欢

转载自blog.csdn.net/qq_39719589/article/details/79067968
今日推荐