yum install gcc gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre-devel
cd /usr/local/src/
wget http://nginx.org/download/nginx-1.14.2.tar.gz
tar -zxvf nginx-1.14.2.tar.gz
cd nginx-1.14.2
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
原文:https://www.cnblogs.com/sky-cheng/p/10755986.html