Centos7安装yum命令
步骤如下
第一步:
http://mirrors.163.com/centos/7/os/x86_64/Packages/
到上面这个网站去下载如下RPM包(为版本号,根据最新的自己替换即可)
python-iniparse-.noarch.rpm
yum-metadata-parser-.x86_64.rpm
yum-.centos.noarch.rpm
yum-plugin-fastestmirror-*.noarch.rpm
下载完成之后,用rpm命令进行安装,如下:
rpm -ivh --force --nodeps python-iniparse-.noarch.rpm
rpm -ivh --force --nodeps yum-metadata-parser-.x86_64.rpm
rpm -ivh --force --nodeps yum-.centos.noarch.rpm
rpm -ivh --force --nodeps yum-plugin-fastestmirror-.noarch.rpm
如:
http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-168.el7.centos.noarch.rpm
http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm
第二步:
下载yum-3.4.3.tar.gz并进行以下步骤
$ wget http://yum.baseurl.org/download/3.4/yum-3.4.3.tar.gz
$ tar -zxvf yum-3.4.3.tar.gz
解压后进到yum-3.4.3目录
$./yummain.py update