1、rpm方式安装
wget http://dl.Fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm #配置epel yum 源
rpm -ivh epel-release-latest-7.noarch.rpm #建立nginx的yum仓yum install nginx -y #下载并安装nginx
systemctl start nginx #启动nginx服务
2、源码安装
参考: https://www.cnblogs.com/zhanghaoyong/p/7737536.html