Replace RedHat 6.6`s yum with CentOS`s yum

1.Uninstall RedHat`s yum  and python-urlgrabber

#yum rpm -aq | grep yum | xargs rpm -e --nodeps(Notice'two -')
#yum rpm -aq | grep python-urlgrabber | xargs rpm -e --nodeps

2.download dependency of yum and yum files

#wget http://http://mirrors.163.com/centos/6/os/x86_64/Packages/<a target=_blank href="http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm">python-urlgrabber-3.9.1-11.el6.noarch.rpm</a>  (python-urlgrabber)
<pre name="code" class="python">#wget http://http://mirrors.163.com/centos/6/os/x86_64/Packages/<a target=_blank href="http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm">yum-3.2.29-73.el6.centos.noarch.rpm        (yum source)</a>
#wget http://http://mirrors.163.com/centos/6/os/x86_64/Packages/<a target=_blank href="http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm">yum-metadata-parser-1.1.2-16.el6.x86_64.rpm</a>  (yum-metadata)
#wget http://http://mirrors.163.com/centos/6/os/x86_64/Packages/<a target=_blank href="http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm">yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm</a>  (yum-plugin)
 

3. Install those yum`s files

#rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
#rpm -ivh yum-3.2.29-73.el6.centos.noarch.rpm    yum-metadata-parser-1.1.2-16.el6.x86_64.rpm 
          yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
4.Remove  yum configure files  *.repo

#rm /etc/yum.repos.d/*
5.Edit Base.repo file

#vi /etc/yum.repos.d/Base.repo
---------Base.repo file info---------------
#CentOS-Base.repo
#
# The mirror system uses the connnecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and 
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist=does not work for you, as a fall back you can try the
# remarked out baseurl = line instead.
#
[base]
name=CentOS-6.5 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/

# mirrorlist = http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirrors.163.com.centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6

# [released updates]
[updates]
name=CentOS-6.5 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/

# mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=updates
gpgcheck=1
# gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


# additional packages that maybe useful
[extras]
<pre name="code" class="html">name=CentOS-6.5 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/

# mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=extras
gpgcheck=1
# gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


# additonal packages that extend functionality of existing packgaes
[centosplus]
<pre name="code" class="html">name=CentOS-6.5 - Plus - 163.com
 
<pre name="code" class="html">baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/

 
# mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=centosplus
<pre name="code" class="html">gpgcheck=1

enabled=0

gpgkey=http://mirrors.163.org/centos/RPM-GPG-KEY-CentOS-6
 

# contrib - packages by Centos Users
[contrib]
<pre name="code" class="html"><pre name="code" class="html">name=CentOS-6.5 - Contrib - 163.com
 
<pre name="code" class="html">baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/

 
# mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=contrib
<pre name="code" class="html">gpgcheck=1

enabled=0

#gpgkey=http://mirrors.163.org/centos/RPM-GPG-KEY-CentOS-6
 
 
 

6.yum clean

#yum clean all

7.MakeCache

#yum makecacke

8.update yum

#yum update

This is all!!!   Have Fun.....












  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值