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://blog.csdn.net/lmq1993/article/details/108416669 https://www.cnblogs.com/ghjbk/p/6744131.html