ReaHat 安装Centos yum

原因: linux没有在红帽网络上注册,所以无法下载上面的软件包,替代方案可以使用centos。

1、  查看 ReaHat 系统中yum 服务相关的包
# rpm -qa|grep yum
2、删除这些包
# rpm -qa|grep yum|xargs rpm -e --nodeps
3、下载Centos yum包
此时需要注意你的操作系统是32还是64位,查看命令:
# uname -a
或者
# arch
结果是i686则是32位,x86_64则是64位
下载地址:
64位   http://mirror.centos.org/centos/5/os/x86_64/CentOS/
# wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
# wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
# wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm


32位   http://mirror.centos.org/centos/5/os/i386/CentOS/
# wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
# wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
# wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-4.el5.i386.rpm

4、安装
# rpm -ivh yum-*
# cd /etc/yum.repos.d/
# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

5、生成缓存
yum makecache
此时安装结束

你可能感兴趣的:(RedHat)