Redhat 7 Configuration Yum two ways to source
One, network mode (virtual machine can connect network)
1. Delete Redhat's original yum source
Rpm-aq|grep Yum|xargs rpm-e--nodeps
#查找所有包含 ' Yum ' rpm package, and then remove --nodeps to indicate that it is not dependent on the delete
2.DownloadYuminstallation files (using the 163 yum source)
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-118.el7.centos.noarch.rpm
wgethttp://mirrors.163.com/centos/7/os/x86_64/packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-24.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
3. install yum
        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-plugin-fastestmirror-1.1.31-24.el7.noarch.rpm yum-3.4.3-118.el7.centos.noarch.rpm
Description: The third sentence installs two Yum packages at the same time, in order to resolve dependencies
4. Update the repo file
This article is from the "Cherich" blog, make sure to keep this source http://cherich.blog.51cto.com/6721432/1767581
Redhat 7 Two ways to configure a Yum source