美文网首页
CentOS7 中怎么把yum的源更换成163源

CentOS7 中怎么把yum的源更换成163源

作者: 有事找叮当 | 来源:发表于2022-06-06 16:25 被阅读0次

CentOS默认yum源是国外的,今天我们把默认源换成国内的163源,163是目前国内最好用的源,速度是相当快的,还有一些比较好的源,比如阿里源。

#进入yum源配置文件
cd /etc/yum.repos.d
#备份一下当前的源,以防出错后可以还原回来
mv ./CentOS-Base.repo ./CentOS-Base-repo.bak
#下载网易163的源
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
#清理一下旧包
yum clean all
#把下载下来文件 CentOS7-Base-163.repo设置成为默认源
mv Centos-7.repo CentOS-Base.repo
#生成缓存即可用163源了
yum makecache

相关文章

网友评论

      本文标题:CentOS7 中怎么把yum的源更换成163源

      本文链接:https://www.haomeiwen.com/subject/vppjmrtx.html