yum list
yum repolist
rpm -aq|grep yum
rpm -aq|grep yum|xargs rpm -e --nodeps
wget -P /home/user/testyum https://mirrors.aliyun.com/centos/7.6.1810/os/x86_64/Packages/yum-3.4.3-161.el7.centos.noarch.rpm
wget -P /home/user/testyum https://mirrors.aliyun.com/centos/7.6.1810/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget -P /home/user/testyum https://mirrors.aliyun.com/centos/7.6.1810/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm
wget -P /home/user/testyum https://mirrors.aliyun.com/centos/7.6.1810/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
cd /home/user/testyum
ls
rpm -ivh python-iniparse-0.4-9.el7.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
rpm -ivh yum-3.4.3-161.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm
由於安裝包之間存在相互依賴關係,四個源包按照順序安裝。node
cd /etc/yum.repos.d/ ls mv redhat.repo redhat.repo.backup wget http://mirrors.163.com/.help/CentOS7-Base-163.repo vi CentOS7-Base-163.repo
修改變量-$releasever爲7python
yum clean all
yum makecache