# 进入解压后的目录 cd nginx-1.21.5 # 执行安装并指定安装位置 ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-stream --with-http_v2_module --with-stream_ssl_preread_module --with-http_gzip_static_module # 安装 make && make install
至此nginx安装成功。
已安装nginx追加模块
执行./nginx -V命令查看
1 2 3 4 5
nginx version: nginx/1.21.5 built by gcc 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC) built with OpenSSL 1.1.1k FIPS 25 Mar 2021 TLS SNI support enabled configure arguments: --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-stream --with-http_v2_module --with-stream_ssl_preread_module --with-http_gzip_static_module