1、安装阿里源
cd /etc/yum.repos.d/
cp CentOS-Base.repo CentOS-Base.repo_$(date +%F)bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
2、安装epel源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
或者使用另外一条命令
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
3、安装rpmforge源
rpm -Uvh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
=======================================================================
1、Centos-6.repo
阿里源,放到/etc/yum.repos.d/目录中需要修改成CentOS-Base.repo
2、epel-6.repo
epel源,放到/etc/yum.repos.d/目录中
3、epel-release-6-8.noarch.rpm
epel源,需要使用命令安装:rpm -ivh epel-release-6-8.noarch.rpm
4、rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpmforge源,需要使用命令安装:rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
本文转自 蜗牛远途 51CTO博客,原文链接:http://blog.51cto.com/ywliyq/1765524