[root@kvm-cc ~]# rpm -aq|grep yum|xargs rpm -e --nodeps //查找、删除rhel 7自身的yum安装包
[root@kvm-cc ~]# rpm -ivh --nodeps langtable-0.0.31-3.el7.noarch.rpm yum-3.4.3-132.el7.centos.0.1.noarch.rpm yum-langpacks-0.4.2-4.el7.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm yum-plugin-aliases-1.1.31-34.el7.noarch.rpm yum-plugin-changelog-1.1.31-34.el7.noarch.rpm yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm yum-plugin-tmprepo-1.1.31-34.el7.noarch.rpm yum-plugin-verify-1.1.31-34.el7.noarch.rpm yum-plugin-versionlock-1.1.31-34.el7.noarch.rpm yum-utils-1.1.31-34.el7.noarch.rpm //安装centos 7的yum包
[root@kvm-cc ~]# cd /etc/yum.repos.d/
[root@kvm-cc yum.repos.d ~]# mv redhat.repo redhat.repo.bak
[root@kvm-cc yum.repos.d ~]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
[root@kvm-cc yum.repos.d ~]# vi CentOS7-Base-163.repo
:%s/$releasever/7/g
[root@kvm-cc yum.repos.d ~]# yum clean all
[root@kvm-cc yum.repos.d ~]# yum makecache
[root@kvm-cc yum.repos.d ~]# yum groupinstall Base System
[root@kvm-cc yum.repos.d ~]# yum groupinstall Development
[root@kvm-cc yum.repos.d ~]# yum update
本文出自 “斯图尔特” 博客,请务必保留此出处http://stuart.blog.51cto.com/728677/1732152
centos 7的yum安装及rhel 7的yum源替换为centos 7的yum源
原文地址:http://stuart.blog.51cto.com/728677/1732152