gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the sourcefor copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## 进入nginx的安装目录 nginx -V ## 可以看到对应的配置参数信息 nginx version: nginx/1.24.0 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) built with OpenSSL 1.0.2k-fips 26 Jan 2017 TLS SNI support enabled configure arguments: --prefix=/usr/local/nginx --with-http_ssl_module --with-stream --with-http_stub_status_module
# 解压源码 tar -xf nginx-1.25.4.tar.gz cd nginx-1.25.4 ## 根据逆向得到的参数进行编译 ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-stream --with-http_stub_status_module ## 如果缺少对应依赖库,可以通过如下命令安装 yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel ## 也可以到对应库的正式网站下载安装,通过命令指定安装位置,比如 ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-stream --with-http_stub_status_module --with-pcre=/root/install_app/pcre2-10.43 ## 安装 make make install ## 查看安装后的版本 /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.25.4 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) built with OpenSSL 1.0.2k-fips 26 Jan 2017 TLS SNI support enabled configure arguments: --prefix=/usr/local/nginx --with-http_ssl_module --with-stream --with-http_stub_status_module --with-pcre=/root/install_app/pcre2-10.43