1、nginx下载

http://nginx.org/en/download.html

建议选择Stable version(稳定版)

2、nginx安装
tar zxvf nginx-1.16.1.tar.gz
cd nginx-1.16.1
./configure
make
sudo make install
3、nginx操作

启动

sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
  4、报错解决方法

centos下载

http://vault.centos.org/7.2.1511/isos/x86_64/

pcre-devel 离线安装

https://blog.csdn.net/hfsu0419/article/details/7190152/

https://blog.csdn.net/czbqoo01/article/details/89242094