转自:http://inlhx.iteye.com/blog/2336729

RedHat 更换Yum源

1.检查yum包 rpm -qa |grep yum
2.删除自带包
rpm -aq | grep yum | xargs rpm -e --nodeps
3.再检查一下
rpm -qa |grep yum
4.下载更新包
 
5.执行安装
rpm -ivh yum-*
如果出现
error: Failed dependencies:
        python-urlgrabber >= 3.9.1-10 is needed by yum-3.2.29-73.el6.centos.noarch
不要慌,这个问题很恶心会导致后面安装前功尽弃,使用下面
rpm -Uvh python-urlgrabber-3.9.1-11.el6.noarch.rpm
更新rpm -Uvh python-urlgrabber版本,不更新肯定安装不过去
在执行:
rpm -ivh yum-*
 
warning: yum-3.2.29-73.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:yum-metadata-parser    ########################################### [ 20%]
   2:yum-plugin-fastestmirro########################################### [ 40%]
   3:yum                    ########################################### [ 60%]
   4:yum-updateonboot       ########################################### [ 80%]
   5:yum-utils              ########################################### [100%]
安装成功了
6.切换源
cd /etc/yum.repos.d/ 
mv redhat.repo redhat.repo.bak
mv rhel-source.repo rhel-source.repo.bak
vi /etc/yum.repos.d/CentOS-Base.repo
粘贴如下信息:
 
#CentOS-Base.repo
#
# The mirror system uses the connecting 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 - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6.7
 
#released updates
[updates]
name=CentOS-6 - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6.7
 
#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6.7
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
 
 
8.清理缓存

yum clean all

yum makecache

9.验证

yum install telnet

Redhat6.7 切换Centos yum源的更多相关文章

  1. Redhat6.5使用centos yum源

    新安装了redhat6.5.安装后,登录系统,使用yum update 更新系统.提示:This system is not registered to Red Hat Subscription Ma ...

  2. Redhat6.6替换Centos Yum源

    1.删除当前系统自带的yum [root@reddhat6_155_201 ~]# rpm -qa |grep yum yum-rhn-plugin--.el6.noarch yum-utils--. ...

  3. redhat centos yum源的安装

    redhat centos yum源的安装 1.除旧 #cd /etc/yum.repos.d #mv rhel-debuginfo.repo rhel-debuginfo.repo.bak 此处将其 ...

  4. centos yum源配置 与yum配置文件

    参考博客 http://www.cnblogs.com/mchina/archive/2013/01/04/2842275.html 1.centos . yum配置文件在目录 /etc/yum.re ...

  5. RedHat 更新CentOS Yum源(转)

    经测试,可用.转自:https://www.cnblogs.com/tangsen/p/5151994.html 一.随笔引言 1.1随笔内容: 1.RedHat 配置Centos yum源 2.yu ...

  6. CentOS yum源设定使用方法的整理(转)

    CentOS yum更新了很多版本更新,我本人认为CentOS yum很好使的文件系统,在此向大家推荐CentOS应该是做为服务器的linux的佼佼者.CentOS采用的二进制包是rpm,不过包的依赖 ...

  7. RHEL6配置CentOS yum源

    RHEL6配置CentOS yum源

  8. RedHat6使用CentOS yum源 换yum

    yum 简单介绍一下 yum 主要功能是更方便的添加/删除/更新RPM 包,自动解决包的倚赖性问题,便于管理大量系统的更新问题. yum 可以同时配置多个资源库(Repository),简洁的配置文件 ...

  9. redhat6 改 centos yum 源

    **redhat的yum在线更新是收费的,如果没有注册的话不能使用,如果要使用,需将redhat的yum卸载后,重启安装其他yum源,再配置其他源.** 本文包括配置本地源及第三方源.第三方源包括:网 ...

随机推荐

  1. Eclipse 代码快捷键模板(一)

    话不多说,自行google. 设置快捷键,打开eclipse,依次打开:Window -> Preferences -> General -> Key. 设置代码快捷键,打卡ecli ...

  2. Jmeter阶梯加压监听

    巧用beanshell,做阶梯加压监听 1. 首先先添加阶梯加压线程组  bzm - Concurrency Thread Group 设置阶梯加压值,目标最大并发用户为80,加速步率时长为100秒, ...

  3. 百度地图addEventListener“赋值”参数

    实现点击百度地图上的覆盖物,然后获取覆盖上的属性,进而实现数据传送. var pointArray=new Array();//创建一个数组存储坐标 /*在地图上标点*/ function ShowA ...

  4. 根据设备id自动打开本设备的串口

    对于串口设备经常遇到重新拔插串口设备时候,程序又需要重新选择串口打开.对此很少麻烦的要死. 现在我们可以根据该设备的id去遍历串口设备,一旦符合就打开此串口即可. public void init() ...

  5. 什么是Ceph存储?什么是分布式存储?简单明了带你学Ceph--<1>

    Ceph存储介绍 为什么要用Ceph Ceph是当前非常流行的开源分布式存储系统,具有高扩展性.高性能.高可靠性等优点,同时提供块存储服务(rbd).对象存储服务(rgw)以及文件系统存储服务(cep ...

  6. PrototypePattern(原型模式)-----Java/.Net

    原型模式(Prototype Pattern)是用于创建重复的对象,同时又能保证性能.这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式.

  7. 1.2 UML带来了什么(学习笔记)

    需求->需求分析->设计->开发 uml 编号 uml元素 对于语言理解 1 元模型 基本词汇 2 表示法或视图 语法 3 RUP 方法(统一软件开发过程)  方法 4 控制类 定语 ...

  8. linux下安装mysql5.7.25详细教程

    前言 最近项目上线,开始给用户测试了.搞下来好多台服务器,自然要装一个mysql的服务器.想想广大博友应该都会遇到如何装mysql的问题,就此分享,给大家一个安装指南.供大家以后安装的时候,提高效率, ...

  9. OpenJ_Bailian 2815 城堡问题(DFS)

    题目传送门OpenJ_Bailian 2815 描述 1 2 3 4 5 6 7 ############################# 1 # | # | # | | # #####---### ...

  10. 【Python系统学习03】错误类型整理(一)

    错误类型与可能原因分析 A.语法错误: 1.syntaxError:invalid syntax 无效的语法 print(2019小石头) # print(2019小石头) # ^ # SyntaxE ...