1.除旧
#cd /etc/yum.repos.d #mv rhel-debuginfo.repo rhel-debuginfo.repo.bak 此处将其备份起来,供意外恢复时使用,如有其他的相关的源设置,都要删除,或是采用以上方法备份。
删除RHEL5自带的YUM及YUM组件 使用rpm -qa | grep yum列出所有相关的包,把它们都删掉,如果因依赖性不能删除,就使用–nodeps参数删除。
2.换新 centos mirrorlist   http://www.centos.org/modules/tinycontent/index.php?id=32 找到下面的软件装上
而后
vim /etc/yum.repos.d/Centos-Base.repo
写入下面的内容:
[base]
name=CentOS-5 - Base
repo=os
gpgcheck=1
[update]
name=CentOS-5 - Updates
baseurl=http://centos.ustc.edu.cn/centos/5/updates/x86_64/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[addons]
name=CentOS-5 - Addons
baseurl=http://centos.ustc.edu.cn/centos/5/addons/x86_64/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[extras]
name=CentOS-5 - Extras
baseurl=http://centos.ustc.edu.cn/centos/5/extras/x86_64/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[centosplus]
name=CentOS-5 - Plus
baseurl=http://centos.ustc.edu.cn/centos/5/centosplus/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[contrib]
name=CentOS-5 - Contrib
baseurl=http://centos.ustc.edu.cn/centos/5/contrib/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
###################
3.Available Repositories for CentOS
根据需要选择适合的repo http://wiki.centos.org/AdditionalResources/Repositories

3rd Party Repositories
推荐源:Extra Packages for Enterprise Linux (EPEL) The Community Enterprise Linux Repository
根据自己需求选择合适的repo
cd /var/cache/yum rm -f * yum list yum search 到这yum应该就可以使用了
4.更新
如果不想升级内核而只更新其他软件包,有两种方法:
1、修改yum配置文件:vim /etc/yum.conf, 在[main]的最后添加exclude=kernel*
2、直接在yum的命令后面添参数:
yum --exclude=kernel* update
 

redhat centos yum源的安装的更多相关文章

  1. redhat更改yum源及安装PHP环境

    redhat更新yum源 删除同RHEL一同安装的yum源 rpm -qa|grep yum #查看本地yum yum list | wc -l #看个数 yum install pip #看现象 r ...

  2. redhat linux使用Centos yum源

    redhat Linux如果是没有购买红帽许可的话是不能使用redhat的yum源的,但是可以通过修改使之能使用Centos的yum源. 步骤一:删除redhat的yum [root@localhos ...

  3. RedHat 更新CentOS Yum源(转)

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

  4. RedHat改yum源免费使用CentOS源

    linux默认是安装了yum软件的,但是由于激活认证的原因让redhat无法直接进行yum安装一些软件 如果我们需要在redhat下直接yum安装软件,我们只用把yum的源修改成CentOS的就好了, ...

  5. Redhat6.5使用centos yum源

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

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

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

  7. Redhat更换yum源

    redhat 默认自带的 yum 源需要注册,才能更新,所以对于我们来说需要替换掉redhat的yum源.下文更换为网易的. 删除原有的yum rpm -qa|grep yum|xargs rpm - ...

  8. redhat7.4 使用centos yum源

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

  9. RedHat6使用CentOS yum源 换yum

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

随机推荐

  1. Deep_learning

    https://en.wikipedia.org/wiki/Deep_learning

  2. jvm 参数

    参数名称 含义 默认值   -Xms 初始堆大小 物理内存的1/64(<1GB) 默认(MinHeapFreeRatio参数可以调整)空余堆内存小于40%时,JVM就会增大堆直到-Xmx的最大限 ...

  3. Startssl 现在就启用 HTTPS,免费的!

    为什么要使用HTTPS 主要是为了安全,虽然没有100%的安全,但是我们可以尽量提高安全级别,目前大型网站都已经使用HTTPS了 注册StartSSL 注册页面  选择国家 和 输入 邮箱 他们会通过 ...

  4. myeclipse添加源码支持

    在MyEclipse中开发,习惯于点击类名,按Ctrl键查看源码,但是,如果是Spring/Hibernate/Struts/JDK这些开源jar的源码该如何看呢? 一般,我们导入的只有jar文 件, ...

  5. 文件管理php代码操作文件

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  6. Uploadify上传问题

    版本:Uploadify Version 3.2官网:http://www.uploadify.com Uploadify是一款基于Jquery的上传插件,用起来很方便.但上传过程中的提示语言为英文, ...

  7. Ubuntu 12.04+DarwinStreamingSrvr6.0.3 架设流媒体服务器

    1.安装Ubuntu 12.04操作系统,网上很多教程.. 2.打开终端,下载darwin源代码DarwinStreamingSrvr6.0.3-Source.tar,补丁patch dss-6.0. ...

  8. LINQ之select方法选择多个字段

    单个字段: var list1 = list.Select(field1 => field1.CouponID).ToList(); 多个字段: var list1 = list.Select( ...

  9. qt QString 与 int,char的转换

    每次QString转换int或者char的时候都要查资料,记录一下,方便下次查看. 参考: http://blog.csdn.net/ei__nino/article/details/7297791 ...

  10. http://blog.csdn.net/yangyuhan156/article/details/48899439

    http://blog.csdn.net/yangyuhan156/article/details/48899439