首页 > 其他 > 详细

RHEL5.4_yum网络源配置

时间:2014-04-01 08:34:52      阅读:546      评论:0      收藏:0      [点我收藏+]

redhat默认是使用rpm安装,我们可以更改使用centos的yum网络源来进行安装。


一、删除redhat的yum所有组件


rpm -qa | grep yum | xargs rpm -e --nodeps     #用--nodeps参数强制删除


二、下载yum组件


请查看附件下载


三、按照顺序安装下载的rpm包


rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm &&

rpm -ivh yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm &&

rpm -ivh yum-3.2.22-26.el5.centos.noarch.rpm &&

yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm


四、创建yum的配置文件


vim /etc/yum.repos.d/CentOS-Base.repo


复制以下内容到该文件,保存即可完成。


[base]

name=CentOS-5 - Base

baseurl=http://centos.ustc.edu.cn/centos/5/os/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5


#released updates

[update]

name=CentOS-5 - Updates

baseurl=http://centos.ustc.edu.cn/centos/5/updates/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5


#packages used/produced in the build but not released

[addons]

name=CentOS-5 - Addons

baseurl=http://centos.ustc.edu.cn/centos/5/addons/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful

[extras]

name=CentOS-5 - Extras

baseurl=http://centos.ustc.edu.cn/centos/5/extras/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5


#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-5 - Plus

baseurl=http://centos.ustc.edu.cn/centos/5/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5


#contrib - packages by Centos Users

[contrib]

name=CentOS-5 - Contrib

baseurl=http://centos.ustc.edu.cn/centos/5/contrib/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5


#packages in testing

[testing]

name=CentOS-5 - Testing

baseurl=http://centos.ustc.edu.cn/centos/5/testing/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5


本文出自 “请按任意键...” 博客,转载请与作者联系!

RHEL5.4_yum网络源配置,布布扣,bubuko.com

RHEL5.4_yum网络源配置

原文:http://yueying.blog.51cto.com/1074742/1387755

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!