先切换到镜像源所在的文件夹:
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