rhel 6.3 yum源更新为centos 6.4 的yum 源

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了rhel 6.3 yum源更新为centos 6.4 的yum 源相关的知识,希望对你有一定的参考价值。

      由于rhel 6.3 的yum自己的源有诸多的限制,很多需要的软件是无法安装的,所以要更新为centos或freebsd的yum源,以便安装软件,不然各种软件之间的依赖关系搞死你!

本文参考:http://zhouxuguang.blog.51cto.com/1053090/896087

      首先先卸载rhel 自带的yum

    rpm -qa |grep yum|xarges rpm -e --nodeps

    然后从网易的镜像站下载如下四个包,我把它放到了/home/yum目录下

wget http://mirrors.163.com/centos/6.4/os/i386/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6.4/os/i386/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6.4/os/i386/Packages/yum-metadata-parser-1.1.2-16.el6.i686.rpm
wget http://mirrors.163.com/centos/6.4/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
wget http://mirrors.163.com/centos/6.4/os/i386/RPM-GPG-KEY-Centos-6
完了安装yum rpm 包
 rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm --nodeps

 rpm  -ivh yum * --nodeps

然后把 mv /etc /yum .repos.d/rhel.repo  /etc /yum .repos.d/centos .repo

打开配置文件 vim/etc /yum .repos.d/centos .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.4 - Base
repo=os
baseurl=http://mirrors.163.com/centos/6.4/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-6.4 - Updates
baseurl=http://mirrors.163.com/centos/6.4/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-6.4 -Extras
baseurl=http://mirrors.163.com/centos/6.4/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.4 - Plus
baseurl=http://mirrors.163.com/centos/6.4/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-6.4  - Contrib
baseurl=http://mirrors.163.com/centos/6.4/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[addons]
name=CentOS-6.4 - Addons
baseurl=http://mirrors.163.com/centos/6.4/addons/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6



完了之后保存退出。

现在更新个httpd 试试!

以上是关于rhel 6.3 yum源更新为centos 6.4 的yum 源的主要内容,如果未能解决你的问题,请参考以下文章

RHEL 6.5 X86_64配置CentOS yum源

RHEL6解决无法使用YUM源问题

RHEL6解决无法使用YUM源问题(转)

RHEL5.6更新yum源

RHEL6 yum本地源配置

RHEL 6.x 安装CentOS 6的yum源