一:删除系统自带的yum
二:下载相关软件包
三:安装下载的软件包
四:下载repo文件
五:更新yum源
1.删除当前系统自带的yum源
rpm -qa|grep yum|xargs rpm -e --nodeps
2.下载相关软件包(http://mirrors.163.com/centos/5/os/x86_64/CentOS/)
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-6.el5.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
3.安装rpm,一定要按顺序来,并且最后两个要一起安装
3.1安装python-iniparse-0.2.3-6.el5.noarch.rpm
3.2安装yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
3.3安装
yum-3.2.22-40.el5.centos.noarch.rpm
yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
4.进入/etc/yum.repos.d目录下,下载repo文件
wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
5.更新yum源 yum update -y