首先,本文主要是對yum的安裝,報錯,排坑做爲目標,以解決平常運維過程當中出現的問題,但願對你們有所幫助。對yum命令的解釋就很少說了,你們能夠自行百度。node
CentOS 7 x86_64python
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/yum-3.4.3-168.el7.centos.noarch.rpm wget http://mirror.centos.org/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm wget http://mirror.centos.org/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
rpm -ivh yum- #同時安裝yum包 rpm -ivh python-iniparse-0.4-9.el7.noarch.rpm #安裝python包
rpm -ivh yum-3.4.3-168.el7.centos.noarch.rpm --force --nodeps yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm
yum clean all #清理環境
cd /var/lib/rpm/ rm -i __db.* rpm --rebuilddb
rpm -qa | grep yum | xargs rpm -e --nodeps