After centos is installed, the fastmirror plug-in is used by default to dynamically select the image source. The disadvantage of this method is that different image sources may be selected each time, resulting in repeated download of the Software List.
Open the/etc/yum. Repos. d/CentOS-Base.repo and you will see something similar to the following:
[Base] Name= Centos-$ releasever-Basemirrorlist= Http://List.centos.org /? Release = $ releasever & arch = $ basearch & repo = OS# Baseurl = http://Mirror.centos.org/centos/?releasever/ OS /?basearch/Gpgcheck =1Gpgkey=File:///Etc/pki/rpm-GPG/RPM-GPG-KEY-CentOS-6
Both Sohu and 163 in China provide centos images, and the download speed is very fast. I am used to using 163 and modify the above content:
[Base] Name= Centos-$ releasever-Base # upload list= Http://List.centos.org /? Release = $ releasever & arch = $ basearch & repo = OSBaseurl = http://Mirrors.163.com/centos/?releasever/ OS /?basearch/Gpgcheck =1Gpgkey=File:///Etc/pki/rpm-GPG/RPM-GPG-KEY-CentOS-6
In the same way, point other images in the CentOS-Base.repo file to 163 and save.
In this way, the next time we use the yum command, we will download it from the specified image website.