更改centOS中的源
首先下载你想安装的源,目前国内有很多很好的源,比如阿里云,163等等,还有各大高校的源
这里我们随便下载一个,但是需要下载对应版本
下载CentOS-Base.repo 到/etc/yum.repos.d/
5版本对应
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
6版本对应
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
7版本对应
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
然后执行命令
[root@localhost ~]# rpm -e rpmforge-release --nodeps [root@localhost ~]# yum clean all [root@localhost ~]# yum update
命令执行成功则安装好了
浙公网安备 33010602011771号