首页 > 系统 > Linux > 正文

Rhel 5 升级为centos 5 并配置 yum源

2024-08-28 00:11:04
字体:
来源:转载
供稿:网友

我的电脑平台是dell的d620,安装了rehhat5 client 和windows xp双系统。

但是感觉rhel 5 使用本地源更新设置比较繁琐,而且不能更新到最新的包。

在网上搜到了一篇相关的帖子,便按照指导安装并成功。记录下安装过程。

以便备用。

1.配置yum

先把RHEL5自带的yum包删除,rpm -qa | grep yum,出来4个包,全部rpm -e 掉,还有一个RedHat-release,这个要—nodeps。然后从http://CentOS.ermly.com/centos/5.1/os/下载CentOS的4个与yum有关的包及centos-release-5-0.0安装。安装后的包如下

yum-metadata-parser-1.0-8.fc6

yum-3.0.5-1.el5.centos.5

yum-updatesd-3.0.5-1.el5.centos.5

修改yum的配置文件,vi /etc/yum.repos.d/CentOS-Base.repo

# CentOS-Base.repo

#

# This file uses a new mirrorlist system developed by Lance Davis for CentOS.

# 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-5.1 - Base

baseurl=http://mirror.tini4u.net/centos/5.1/os/$basearch/

http://centos.ustc.edu.cn/centos/5.1/os/$basearch/

http://ftp.daum.net/centos/5.1/os/$basearch/

http://mirror.secuidc.com/centos/5.1/os/$basearch/

http://centos.ermly.com/centos/5.1/os/$basearch/

http://ftp.hostrino.com/pub/centos/5.1/os/$basearch/

gpgcheck=1

gpgkey=http://centos.ermly.com/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5

#released updates

[updates]

name=CentOS-5.1 - Updates

baseurl=http://mirror.tini4u.net/centos/5.1/os/$basearch/

http://centos.ustc.edu.cn/centos/5.1/os/$basearch/

http://ftp.daum.net/centos/5.1/os/$basearch/

http://mirror.secuidc.com/centos/5.1/os/$basearch/

http://centos.ermly.com/centos/5.1/updates/$basearch/

http://ftp.hostrino.com/pub/centos/5.1/os/$basearch/

gpgcheck=1

gpgkey=http://centos.ermly.com/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released

[addons]

name=CentOS-5.1 - Addons

baseurl=http://mirror.tini4u.net/centos/5.1/os/$basearch/

http://centos.ustc.edu.cn/centos/5.1/os/$basearch/

http://ftp.daum.net/centos/5.1/os/$basearch/

http://mirror.secuidc.com/centos/5.1/os/$basearch/

http://centos.ermly.com/centos/5.1/addons/$basearch/

http://ftp.hostrino.com/pub/centos/5.1/os/$basearch/

gpgcheck=1

gpgkey=http://centos.ermly.com/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful

[extras]

name=CentOS-5.1 - Extras

baseurl=http://mirror.tini4u.net/centos/5.1/os/$basearch/

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表