cd /etc/yum.repos.d
备份一下原来的yum源
mv CentOS-Base.repo CentOS-Base.repo.bk
下载新的CentOS-Base.repo 到/etc/yum.repos.d/ 如下的源用一个就好,三条命令选其一
//更新为阿里云的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
//更新为163的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
//更新为搜狐的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
运行yum makecache生成缓存
yum clean all
yum makecache
2018.09.20 16:15:52字数 46阅读 357
cd /etc/yum.repos.d
备份一下原来的yum源
mv CentOS-Base.repo CentOS-Base.repo.bk
下载新的CentOS-Base.repo 到/etc/yum.repos.d/ 如下的源用一个就好,三条命令选其一
//更新为阿里云的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
//更新为163的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
//更新为搜狐的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
运行yum makecache生成缓存
yum clean all
yum makecache
(adsbygoogle = window.adsbygoogle || []).push({});
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有