RHEL-Like
1 前言
最近使用CentOS 5.1或RHEL 5.1的yum工具安装软件包时,发现5.1的OS版本yum工具无法正常更新,于是乎一顿折腾发现经验是yum工具的版本太过低,无法与当前的yum包数据库匹配。
2 最佳实践
2.1 CentOS 5.x的处理方法
2.1.1 升级yum工具
cd ~ wget http://vault.centos.org/5.2/os/x86_64/CentOS/yum-3.2.8-9.el5.centos.1.noarch.rpm wget http://vault.centos.org/5.2/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm wget http://vault.centos.org/5.2/os/x86_64/CentOS/yum-metadata-parser-1.1.2-2.el5.x86_64.rpm wget http://vault.centos.org/5.2/os/x86_64/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm rpm -Uvh yum-metadata-parser-1.1.2-2.el5.x86_64.rpm yum-3.2.8-9.el5.centos.1.noarch.rpm yum-updatesd-0.9-2.el5.noarch.rpm rm -rf *.rpm
2.1.2 配置yum源
mkdir -p /etc/yum.repos.d/backup/ mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/ yum install http://vault.centos.org/5.2/os/x86_64/CentOS/centos-release-5-2.el5.centos.x86_64.rpm
2.1.3 测试yum源
yum list
2.1.4 升级系统
yum update
2.2 RHEL 5.x的处理方法
2.2.1 下载官方的ISO并搭建yum服务器
由于不是本章重点,如何搭建yum服务器请自己研究,这里不再详述。
假设搭建好的服务器地址是,http://srpms.cmdschool.org
2.2.2 升级yum工具
cd ~ wget http://srpms.cmdschool.org/rhel/rhel-server-5.2-x86_64/DVD/Server/yum-3.2.8-9.el5.noarch.rpm wget http://srpms.cmdschool.org/rhel/rhel-server-5.2-x86_64/DVD/Server/python-iniparse-0.2.3-4.el5.noarch.rpm wget http://srpms.cmdschool.org/rhel/rhel-server-5.2-x86_64/DVD/Server/yum-metadata-parser-1.1.2-2.el5.x86_64.rpm wget http://srpms.cmdschool.org/rhel/rhel-server-5.2-x86_64/DVD/Server/yum-updatesd-0.9-2.el5.noarch.rpm wget http://srpms.cmdschool.org/rhel/rhel-server-5.2-x86_64/DVD/Server/gamin-python-0.1.7-8.el5.x86_64.rpm rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm rpm -Uvh yum-metadata-parser-1.1.2-2.el5.x86_64.rpm yum-3.2.8-9.el5.noarch.rpm yum-updatesd-0.9-2.el5.noarch.rpm rm -rf *.rpm
2.2.3 配置yum源
mkdir -p /etc/yum.repos.d/backup/ mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/ curl http://srpms.cmdschool.org/rhel/rhel-server-5.11-x86_64/rhel-server-5.11-x86_64.repo > /etc/yum.repos.d/rhel-server-5.11-x86_64.repo
2.2.4 测试yum源
yum list
2.2.5 升级系统
yum update
参阅文档:
===============
https://access.redhat.com/solutions/28563
没有评论