banner
李大仁博客

李大仁博客

天地虽大,但有一念向善,心存良知,虽凡夫俗子,皆可为圣贤。

[Linux] CentOS Modify YUM Mirror Address to Improve Download Speed

The default download address for CentOS's yum is not in China, and the download speed in China is extremely slow. Generally, you can change the YUM mirror address to improve the download speed of software packages.
The following two methods can be used to modify the mirror address:

  1. Install yum-fastestmirror to automatically select the fastest mirror for downloading.
  2. Change the download mirror address and select a domestic mirror address for downloading.

Please note that if fastestmirror is installed, the modified mirror address may become invalid due to the use of dynamically selected mirror addresses by the plugin.

Method 1

yum install yum-plugin-fastestmirror

Method 2

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

Recommended mirrors:
Public Network
163 NetEase: http://mirrors.163.com/.help/CentOS-Base-163.repo
Sohu: http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
Education Network/Public Network
University of Science and Technology of China: http://centos.ustc.edu.cn/CentOS-Base.repo

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.