#由于我这是一个新的KVM 因此换个国内源 有利于提速#换源 以下不做解释[root@localhost ss]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup[root@localhost ss]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
--2020-10-15 16:58:24-- https://mirrors.aliyun.com/repo/Centos-8.repo
Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 58.216.4.239, 222.186.16.238, 222.186.18.238, ...
Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|58.216.4.239|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2595 (2.5K)[application/octet-stream]
Saving to: ‘/etc/yum.repos.d/CentOS-Base.repo’
/etc/yum.repos.d/Ce 100%[===================>] 2.53K --.-KB/s in 0.001s
2020-10-15 16:58:25 (4.38 MB/s) - ‘/etc/yum.repos.d/CentOS-Base.repo’ saved [2595/2595][root@localhost ss]# sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo[root@localhost ss]# yum makecache
Repository AppStream is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
CentOS-8 - AppStream 7.5 kB/s | 4.3 kB 00:00
CentOS-8 - Base - mirrors.aliyun.com 276 kB/s | 2.2 MB 00:08
CentOS-8 - Extras - mirrors.aliyun.com 3.6 kB/s | 8.1 kB 00:02
Metadata cache created.
[root@localhost ss]#