Jan*_*sky 4 centos yum redhat-enterprise-linux
我获得了 RHEL5.5 机器的 VM,但我没有订阅 RHN。使用 yum 时收到此警告:
bash-3.2$ sudo yum update
[sudo] password for streamsadmin:
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Skipping security plugin, no data
Setting up Update Process
No Packages marked for Update
Run Code Online (Sandbox Code Playgroud)
我可以改用 CentOS 软件库吗?
您当然可以进行此切换。基本上你,或多或少,将你的安装指向 CentOS 存储库,然后继续你的快乐方式。但是,您会遇到一个主要问题,即所有 CentOS 存储库似乎都在 5.9 版中拥有它们的 5.x 软件包。乍一看,似乎不再有 5.5 特定的存储库。
几年前我在一个网络农场(大约是 RHEL/CentOS 5.3 时代)做过这个,但从那以后就没有了....首先确保你有系统的当前备份,因为这和所有转换一样,可能会导致相当大的局部损坏遇到困难时。当我这样做时,我能够跨级到相同的 CentOS/RHEL 版本。我不确定同时交叉分级和升级的含义是什么。可能是一团糟,所以请谨慎行事。
1)清理yum的缓存:
yum clean all
Run Code Online (Sandbox Code Playgroud)
2) 下载 CentOS 密钥(我只是选择了一个 CentOS 镜像,你可以使用任何你喜欢的http://mirrors.centos.org)
wget http://mirrors.cat.pdx.edu/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5
Run Code Online (Sandbox Code Playgroud)
3)...发布rpm和注意事项:
wget http://mirrors.cat.pdx.edu/centos/5/os/x86_64/CentOS/centos-release-5-9.el5.centos.1.x86_64.rpm
wget http://mirrors.cat.pdx.edu/centos/5/os/x86_64/CentOS/centos-release-notes-5.9-0.x86_64.rpm
Run Code Online (Sandbox Code Playgroud)
4) ... 嗯
wget http://mirrors.cat.pdx.edu/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
wget http://mirrors.cat.pdx.edu/centos/5/os/x86_64/CentOS/yum-updatesd-0.9-5.el5.noarch.rpm
Run Code Online (Sandbox Code Playgroud)
5)导入新的KEY:
rpm --import RPM-GPG-KEY-CentOS-5
Run Code Online (Sandbox Code Playgroud)
6) 删除redhat release
rpm -e --nodeps redhat-release
Run Code Online (Sandbox Code Playgroud)
7) ...和红帽网络插件
rpm -e yum-rhn-plugin
Run Code Online (Sandbox Code Playgroud)
8) 安装您刚刚下载的 RPM(首先确保您当前目录中没有任何其他 RPM)
rpm -Uvh -force yum*.rpm centos*.rpm
Run Code Online (Sandbox Code Playgroud)
9) 使用新存储库中的软件包升级系统:
yum upgrade
Run Code Online (Sandbox Code Playgroud)
10) 重启。
几年前我再次这样做了,它的效果与当时宣传的完全一样。但是,这是一个很大的问题,它介于 RHEL 和 CentOS 的相同版本之间。
RHEL 和 CentOS 非常稳定,所以这可能仍然有效。如果是任何其他非企业版本,我会毫不犹豫地建议您重新安装。然而,事实上......它可能会起作用。
| 归档时间: |
|
| 查看次数: |
10466 次 |
| 最近记录: |