安装依赖
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
下载稳定版本
wget http://nginx.org/download/nginx-1.16.1.tar.gz
解压
tar -zxvf nginx-1.16.1.tar.gz
进入目录
cd nginx-1.16.1
配置编译
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
安装
make && make install
被安装的目录
/usr/local/nginx/