升级之前的openssl版本1.0.2k-fips 26 Jan 2017
[root@localhost ~]# nginx -V
nginx version: nginx/1.26.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
准备OpenSSL源码包:
[root@www src]# pwd
/usr/local/src
[root@www src]# wget https://www.openssl.org/source/openssl-1.1.1h.tar.gz
[root@www src]# tar -xf openssl-1.1.1h.tar.gz
编译安装
[root@www src]# cd /usr/local/src/nginx-1.26.2/
[root@www nginx-1.26.2]# ./configure --prefix=/software/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-stream --with-stream_ssl_module --with-stream_realip_module --add-module=/usr/local/src/echo-nginx-module --with-openssl=/usr/local/src/openssl-3.4.0
[root@www src]# make && make install
确认openssl的版本已经升级到1.1.1h 22 Sep 2020
[root@www nginx-1.26.2]# nginx -V
nginx version: nginx/1.26.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
built with OpenSSL 1.1.1h 22 Sep 2020
TLS SNI support enabled
configure arguments: --prefix=/software/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-stream --with-stream_ssl_module --with-stream_realip_module --add-module=/usr/local/src/echo-nginx-module --with-openssl=/usr/local/src/openssl-1.1.1h
[root@www nginx-1.26.2]#