Linunx系统编译安装nginx时报错:ssl相关问题解决方案
安装nginx编译时报错:
1.nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf
(nginx缺少http_ssl_module模块,需要在已安装的nginx中添加ssl模块。)
2."./configure: error: SSL modules require the OpenSSL library”
同步解决:
1.安装openssl 执行
yum -y install openssl openssl-devel make zlib zlib-devel gcc gcc-c++ libtool pcre pcre-devel
2.openssl升级到1.1.1
wget https://www.openssl.org/source/openssl-1.1.1.tar.gz
开始编译安装,首先指定安装路径 ./config --prefix=/usr/local/openssl ,然后执行 make && make install 进行编译安装
3. ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-openssl=/packages/nginx/openssl-1.1.1
4. make && make install
(注意:/packages/nginx/openssl-1.1.1 是openssl-1.1.1安装包的位置,/packages/nginx是放nginx安装包的位置)
参考网站: https://www.cnblogs.com/zkfopen/p/10174930.html
https://www.cnblogs.com/ghjbk/p/6744131.html