不小心删除了yum,yum命令无效,需要重新安装yum。
百度半天Centos6版下载大部分都是来自 http://mirrors.163.com/centos/6/os/x86_64/Packages/ 这个网址,但这个网址现在已经404了。
推荐网址:https://vault.centos.org/6.8/os/x86_64/Packages/
开始安装:
下载yum所需要的软件
1)python-iniparse-0.3.1-2.1.el6.noarch.rpm
2)yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
3)yum-3.2.29-73.el6.centos.noarch.rpm
4)yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
下载命令
wget https://vault.centos.org/6.8/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm wget https://vault.centos.org/6.8/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm wget https://vault.centos.org/6.8/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm wget https://vault.centos.org/6.8/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
安装命令
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm rpm -ivh yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm --force --nodeps
验证
yum list