CentOS配置国内YUM源

 

[root@bass yum.repos.d]# pwd
/etc/yum.repos.d
[root@bass yum.repos.d]# ls
CentOS-Base.repo       CentOS-fasttrack.repo  CentOS-Vault.repo
CentOS-Debuginfo.repo  CentOS-Media.repo
[root@bass yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bk
[root@bass yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
--2016-07-21 09:30:33--  http://mirrors.163.com/.help/CentOS6-Base-163.repo
Resolving mirrors.163.com... 123.58.173.186, 123.58.173.185
Connecting to mirrors.163.com|123.58.173.186|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2006 (2.0K) [application/octet-stream]
Saving to: “CentOS6-Base-163.repo”

100%[======================================>] 2,006       --.-K/s   in 0s      

2016-07-21 09:30:34 (196 MB/s) - “CentOS6-Base-163.repo” saved [2006/2006]

更新玩yum源后,执行下边命令更新yum配置,使操作立即生效
[root@bass yum.repos.d]# yum makecache
 
 

 

posted @ 2016-07-21 09:33  bass  阅读(278)  评论(0编辑  收藏  举报