CentOS6 的yum源配置位于:
# cd /etc/yum.repos.d/
1.备份系统yum源配置文件
# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载163的yum源配置文件
# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
此时当前目录如下:
# ll total 44 -rw-r--r-- 1 root root 2006 Sep 18 2014 CentOS6-Base-163.repo -rw-r--r-- 1 root root 1991 Mar 28 18:25 CentOS-Base.repo ...
3. 运行yum makecache生成缓存
# yum makecache原文链接:https://www.f2er.com/centos/376639.html