如何使用 CentOS Repos 更新 Red Hat Enterprise Linux 5.4

5 linux redhat centos rhel5

我不再订阅 RHEL,我想更新我的服务器。谁能告诉我如何使用 CentOS Repos 更新 Red Hat Enterprise Linux 5.4?

小智 8

好吧,我想通了。我创建了一个文件 CentOs.repo (/etc/yum.repos.d/CentOs.repo),内容如下:

[CentOS-Base]
name=CentOS-Base
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

[CentOS-Updates]
name=CentOS-Updates
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=updates
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

[CentOS-Plus]
name=CentOS-Plus
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
Run Code Online (Sandbox Code Playgroud)


tyl*_*erl 1

IIRC,您只需安装适当的centos-release软件包,然后运行yum upgrade(或者yum update如果您不想废弃任何东西)。