Centos配置163YUM源
1、首先备份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
2、根据CentOS不同版本选择下载对应的repo文件,放到/etc/yum.repos.d/ 目录
cd /etc/yum.repos.d/ # CentOS 5.x wget http://mirrors.163.com/.help/CentOS5-Base-163.repo # CentOS 6.x wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
3、重命名下载好的CentOS-Base-163.repo文件
# CentOS 5.x mv /etc/yum.repos.d/CentOS5-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo # CentOS 6.x mv /etc/yum.repos.d/CentOS6-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo
4、最后,执行yum makecache生成缓存
yum makecache
OK, 简单4步操作即可配置完成。