码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2018-08-07 11:02:32      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:this   ip add   UNC   yum源   依赖   依赖关系   fas   for   extras   

      由于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 源

标签:this   ip add   UNC   yum源   依赖   依赖关系   fas   for   extras   

原文地址:http://blog.51cto.com/feiying89/2155602

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!