CentOS

更换 yum 源

系统默认 yum 源中多数内容均为国外的链接,大家都懂的。。
更换下国内的 yum 源

[root@localhost ~]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
--2019-04-25 22:40:29--  http://mirrors.163.com/.help/CentOS7-Base-163.repo
正在解析主机 mirrors.163.com (mirrors.163.com)... 59.111.0.251
正在连接 mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1572 (1.5K) [application/octet-stream]
正在保存至: “CentOS7-Base-163.repo”

100%[=====================================================>] 1,572       --.-K/s 用时 0s

2019-04-25 22:40:29 (239 MB/s) - 已保存 “CentOS7-Base-163.repo” [1572/1572])

[root@localhost ~]# 
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[root@localhost ~]#
[root@localhost ~]# mv CentOS7-Base-163.repo /etc/yum.repos.d/
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# yum clean all
已加载插件:fastestmirror
正在清理软件源: base extras updates
Cleaning up list of fastest mirrors
[root@localhost ~]#
[root@localhost ~]# yum makecache
已加载插件:fastestmirror
Determining fastest mirrors
base                                                                    | 3.6 kB  00:00:00
extras                                                                  | 3.4 kB  00:00:00
updates                                                                 | 3.4 kB  00:00:00
(1/12): base/7/x86_64/group_gz                                          | 166 kB  00:00:00
(2/12): base/7/x86_64/primary_db                                        | 6.0 MB  00:00:00
(3/12): base/7/x86_64/filelists_db                                      | 7.1 MB  00:00:00
(4/12): base/7/x86_64/other_db                                          | 2.6 MB  00:00:00
(5/12): extras/7/x86_64/prestodelta                                     |  52 kB  00:00:00
(6/12): extras/7/x86_64/filelists_db                                    | 236 kB  00:00:00
(7/12): extras/7/x86_64/primary_db                                      | 188 kB  00:00:00
(8/12): extras/7/x86_64/other_db                                        | 120 kB  00:00:00
(9/12): updates/7/x86_64/filelists_db                                   | 3.0 MB  00:00:00
(10/12): updates/7/x86_64/prestodelta                                   | 511 kB  00:00:00
(11/12): updates/7/x86_64/primary_db                                    | 3.4 MB  00:00:00
(12/12): updates/7/x86_64/other_db                                      | 488 kB  00:00:00
元数据缓存已建立
[root@localhost ~]#
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值