配置yum源的步骤 1.可以移除默认的yum仓库,也就是删除 /etc/yum.repos.d/底下所有的.repo文件(踢出国外的yum源) 1.配置yum源,找到阿里云的官方镜像源地址 https://opsx.alibaba.com/mirror 2.下载centos7的yum源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 3.清空旧的yum缓存 yum clean all 4.生成新的yum仓库缓存(这个缓存来自于阿里云的yum仓库,便于加速软件下载) yum makecache 5.配置一个第三方的 额外仓库源 (epel源),这个源的作用是,如果阿里云源找不到这个软件,就在这里找 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo 此时就可以通过yum命令自由的下载软件啦! yum install redis #这个redis就是从epel中下载 #下载一个nginx web服务器软件 yum install nginx -y #下载好了之后,(通过yum安装的软件,都可以通过系统服务管理命令,来管理它的start/stop/restart