先切换到镜像源所在的文件夹cd /etc/yum.repos.d原来的源不删。下载一个wget工具yum -y install wget下载阿里云 EPEL 源配置wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo更新缓存yum makecache然后再下载nginx#启动并设置开机自启 systemctl start nginx systemctl enable nginx #查看nginx状态 systemctl status nginx