You can modify the image address in either of the following ways,
1. Install yum-fastestmirror to automatically select the fastest image to download
2. Change the image download address and select the image download address in China.
Note that after fastestmirror is installed, the modified image address may be invalid because the plug-in uses a dynamically selected image address.
Method 1
The code is as follows: |
Copy code |
Yum install yum-plugin-fastestmirror |
Method 2
The code is as follows: |
Copy code |
Cd/etc/yum. repos. d Mv CentOS-Base.repo CentOS-Base.repo.bak Wget http://mirrors.163.com/.help/CentOS-Base-163.repo Mv CentOS-Base-163.repo CentOS-Base.repo |
The following images are recommended:
Public network
163 NetEase: http://mirrors.163.com/.help/CentOS-Base-163.repo
Sohu: http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
CERNET/public network
University of Science and Technology: http://centos.ustc.edu.cn/CentOS-Base.repo