安装阿里yum源
[root@client ~]# cd /etc/yum.repos.d/
[root@client yum.repos.d]# mkdir bak
[root@client yum.repos.d]# mv *o bak/
[root@client yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[root@client yum.repos.d]# ls
bak CentOS-Base.repo
安装epel源
[root@client yum.repos.d]# yum install epel-release
[root@client yum.repos.d]# ls
bak CentOS-Base.repo epel.repo epel-testing.repo
[root@client yum.repos.d]# yum makecache
[root@client ~]# yum repolist
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
base: mirrors.aliyun.com
epel: mirrors.aliyun.com
extras: mirrors.aliyun.com
updates: mirrors.aliyun.com
源标识 源名称 状态
base/7/x86_64 CentOS-7 - Base - mirrors.aliyun.com 10,019
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,030
extras/7/x86_64 CentOS-7 - Extras - mirrors.aliyun.com 385
updates/7/x86_64 CentOS-7 - Updates - mirrors.aliyun.com 1,477
repolist: 24,911
来源:CSDN
作者:qq_46107209
链接:https://blog.csdn.net/qq_46107209/article/details/104653721