用CentOS的数据包来升级RedHat Linux

本文详细介绍了如何通过修改yum配置文件、下载并导入yum密钥来利用CentOS的数据包升级RedHatLinux系统。包括具体操作步骤、配置文件编辑和密钥导入过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

CentOSRedHat兼容,因此我们可以用CentOS的数据包来升级RedHat Linux

 

修改yum配置:

1,修改 /etc/yum.repos.d/rhel-debuginfo.repo 为如下内容
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[base]
name=Red Hat Enterprise Linux $releasever -Base
baseurl=http://ftp.twaren.net/Linux/CentOS/5/os/$basearch/
gpgcheck=1
[update]
name=Red Hat Enterprise Linux $releasever -Updates
baseurl=http://ftp.twaren.net/Linux/CentOS/5/updates/$basearch/
gpgcheck=1
[extras]
name=Red Hat Enterprise Linux $releasever -Extras
baseurl=http://ftp.twaren.net/Linux/CentOS/5/extras/$basearch/
gpgcheck=1
[addons]
name=Red Hat Enterprise Linux $releasever -Addons
baseurl=http://ftp.twaren.net/Linux/CentOS/5/addons/$basearch/
gpgcheck=1

 

 

 

2.下载并导入yum key
cd /etc/pki/rpm-gpg

[root@localhost rpm-gpg]# wget http://mirrors.kernel.org/centos/RPM-GPG-KEY-CentOS-5

--2011-04-05 07:55:15--  http://mirrors.kernel.org/centos/RPM-GPG-KEY-CentOS-5

Resolving mirrors.kernel.org... 199.6.1.174, 130.239.17.6, 149.20.4.71, ...

Connecting to mirrors.kernel.org|199.6.1.174|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 1504 (1.5K) [text/plain]

Saving to: `RPM-GPG-KEY-CentOS-5'

 

100%[===================================================================================>] 1,504        833B/s   in 1.8s    

 

2011-04-05 07:55:20 (833 B/s) - `RPM-GPG-KEY-CentOS-5' saved [1504/1504]

 

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值