Yum source updated to the domestic mirror address
1) Backup system original file
[Email protected] ~]# Mv/etc/yum.repos.d/centos-base.repo/etc/yum.repos.d/centos-base.repo.backup
2) Download the domestic image address file
[[email protected] ~]# wget http://mirrors.163.com/. help/centos6-base-163.repo -p /usr/local/src/--2015-07-04 20:31:59-- http:// mirrors.163.com/.help/centos6-base-163.reporesolving mirrors.163.com... 123.58.173.185, 123.58.173.186connecting to mirrors.163.com|123.58.173.185|:80... connected. http request sent, awaiting response... 200 oklength: 2006 (2.0K) [application/octet-stream]Saving to: "/usr/local/src/centos6-base-163.repo" 100%[============== ===========================================================>] 2,006 --.-k/s in 0s 2015-07-04 20:32:04 (17.4 mb/s) - "/usr/local/src/centos6-base-163.repo" saved [2006/2006]
3) Copy the files to the system directory
[email protected] src]# CP Centos6-base-163.repo/etc/yum.repos.d/centos-base.repo
4) Clear cache, refresh Yum
[[email protected] src]# yum clean allloaded plugins: fastestmirror, securitycleaning repos: base extras updatescleaning up everythingcleaning up list of fastest mirrors[[email protected] src]# yum makecacheloaded plugins: fastestmirror, securityDetermining fastest mirrorsbase | 3.7 kB 00:00 base/group_gz | 216 kB 00:00 base/filelists_db | 6.1 mb 00:06 base/primary_db | 4.6 MB 00:04 base/other_db | 2.8 mb 00:02 extras | 3.4 kB 00:00 extras/filelists_db | 32 kB 00:00 extras/prestodelta | 605 B 00:00 extras/primary_db | 31 kb 00:00 extras/ other_db &nBsp; | 37 kb 00:00 updates | 3.4 kB 00:00 updates/filelists_db | 2.6 MB 00:02 updates/prestodelta | 398 kB 00:00 updates/primary_db | 3.9 mb 00:03 updates/ other_db | 38 MB 00:38 metadata cache created
This article is from the "topspeed_king" blog, make sure to keep this source http://mylinuxlife.blog.51cto.com/4706737/1670960
The Yum source in the Linux system is updated to the domestic mirror address