# 安装
version=1.16.0
yum install -y gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel autoconf automake make wget https://nginx.org/download/nginx-${version}.tar.gz tar -xf nginx-${version}.tar.gz cd nginx-${version} useradd -M -s /sbin/nologin nginx ./configure --prefix=/soft/nginx --user=nginx --group=nginx --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_ssl_module --with-stream --with-threads --with-file-aio
make && make install
# 设置环境变量
vim /etc/profile.d/nginx.sh
export PATH=/soft/nginx/sbin:$PATH
source /etc/profile
# 查看nginx默认安装模块(在解压的二进制包目录下)
cat auto/options |grep "YES"