更换 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 ~]#