将默认的国外源替换为国内的网易的源
参考帮助文档: http://mirrors.163.com/.help/centos.html
查看本机版本: cat /etc/redhat-release
先安装 wget:yum install wget
默认源的备份与网易源的安装:
备份:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
切换目录:
cd /etc/yum.repos.d/
选择版本下载安装 (我的是 6 版本)
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
再执行下面两个命令
- yum clean all
- yum makecache
来源: http://www.bubuko.com/infodetail-2536913.html