yum是centos下更新、管理软件的命令,也有相应的图像界面版本;yum源是yum命令去哪里取安装包的地图;yum命令查询repo上配置的地址去取相应的rpm包进行安装;[root@localhost ~]# uname -r
3.10.0-693.el7.x86_64[root@localhost ~]# cat /etc/redhat-releaseCentOS Linux release 7.4.1708 (Core)1、备份系统原来的yum源
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak2、下载阿里云的CentOS-Base.repo 到/etc/yum.repos.d/
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者[root@localhost ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、添加阿里云公共DNS为了防止不能寻找yun源地址,生成cache,先添加阿里云的DNS[root@localhost ~]# vim /etc/resolv.conf添加nameserver 223.5.5.5
nameserver 223.6.6.64、清理缓存,并生成新缓存[root@localhost ~]# yum clean all && yum makecache