CentOS5.x: http://mirrors.163.com/.help/CentOS5-Base-163.repo
CentOS6.x: http://mirrors.163.com/.help/CentOS6-Base-163.repo
CentOS 163 yum源使用:
1、先关闭 fastestmirror
vim /etc/yum/pluginconf.d/fastestmirror.conf
设置 enable=0
2、先备份 /etc/yum.repos.d/CentOS-Base.repo
cd /etc/yum.repos.d
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.old
3、进入 http://mirrors.163.com/.help/centos.html 下载 CentOS6-Base-163.repo,放入 /etc/yum.repos.d/ 。
wget -c http://mirrors.163.com/.help/CentOS6-Base-163.repo
4、生成缓存
yum makecache
其他命令参考:
1、yum search softwarename 查找软件
2、yum list softwarename 列出已装软件
3、yum install softwarename 安装软件
4、yun remove softwarename 卸载软件
阿里yum源:
cd /etc/yum.repos.d/
mv mv CentOS-Base.repo CentOS-Base.repo.back
wget -O CentOS-Base.repo http://mirrors.aliyuncs.com/repo/Centos-6.repo
yum makecache