centos配置163 源

前端之家收集整理的这篇文章主要介绍了centos配置163 源前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1. 首先备份/etc/yum.repos.d/CentOS-Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2. 下载对应版本repo文件,放入/etc/yum.repos.d/(操作前请做好相应备份)

CentOS7

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo /etc/yum.repos.d

CentOS6

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo /etc/yum.repos.d

CentOS5

wget http://mirrors.163.com/.help/CentOS5-Base-163.repo /etc/yum.repos.d

3. 运行以下命令生成缓存

yum clean all
yum makecache

猜你在找的CentOS相关文章