Enter the following command sequence in which centos7:
1. Download the latest yum-3.2.28.tar.gz and extract
wget http://yum.baseurl.org/download/3.2/yum-3.2.28.tar.gz
tar xvf yum-3.2.28.tar.gz
2, enter the directory, run the installation
cd yum-3.2.28 yummain.py install yum
If the result of an error: CRITICAL: yum.cli: Config Error: Error accessing file for config file: /// etc /
Probably originally missing configuration file. New in the etc directory yum.conf the following file, and then run yummain.py install yum again, successfully complete the installation.
3, last updated systems.
yum check-update yum update yum clean all