RHEL中yum环境设置
Ubuntu下的apt相当好用,可惜现在服务器的操作系统很少用到Ubuntu,大部分都是安装的Red Hat Enterprise Linux,RHEL的yum库要付给给Red Hat,所以需要把RHEL升级到CentOS,然后使用CentOS的免费yum库。
1.安装安全证书
rpm --import http://mirror.centos.org/centos-5/5/os/x86_64/RPM-GPG-KEY-CentOS-5
2.安装release package
rpm -Uvh http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/centos-release-notes-5.8-0.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/centos-release-5-8.el5.centos.x86_64.rpm
3.rpm -qa | grep yum
卸载 原有的yum
4. 装上新CentOS的yum
rpm -Uvh http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
强制安装
rpm -Uvh --nodeps http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm
5.更新
yum update
至此便可以正常使用yum来管理软件包了