yum是centos下更新、管理软件的命令,也有相应的图像界面版本;
yum源是yum命令去哪里取安装包的地图;
yum命令查询repo上配置的地址去取相应的rpm包进行安装;
[root@localhost ~]# uname -r 3.10.0-693.el7.x86_64 [root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core)
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
[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
为了防止不能寻找yun源地址,生成cache,先添加阿里云的DNS
[root@localhost ~]# vim /etc/resolv.conf 添加 nameserver 223.5.5.5 nameserver 223.6.6.6
[root@localhost ~]# yum clean all && yum makecache
上一篇