本文共 1656 字,大约阅读时间需要 5 分钟。
nginx版本:nginx-1.11.12
openssl版本:openssl-1.0.2j操作系统版本:centos 6.8步骤:
升级openssl-1.0.2j#yum -y install gcc*
安装第三方库cd /home && wget
tar xf openssl-1.0.2j.tar.gz
cd openssl-1.0.2j/ && ./config --prefix=/usr/local/opensslmake && make installmv /usr/bin/openssl /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl ln -s /usr/local/openssl/include/openssl /usr/include/openssl echo "/usr/local/openssl/lib">>/etc/ld.so.conf ldconfig -vecho 'export OPENSSL=/usr/local/openssl/bin' >>/etc/profile
echo 'export PATH=$OPENSSL:$PATH:$HOME/bin' >>/etc/profilesource /etc/profileopenssl version -a安装nginx-1.11.12
cd /home && wget
/usr/local/nginx/sbin/nginx -s stopmv /usr/local/nginx/ /opt/tar -xf nginx-1.11.12.tar.gz && cd nginx-1.11.12
vim /home/nginx-1.11.12/auto/lib/openssl/conf
把CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"改成CORE_INCS="$CORE_INCS $OPENSSL/include"CORE_DEPS="$CORE_DEPS $OPENSSL/include/openssl/ssl.h"CORE_LIBS="$CORE_LIBS $OPENSSL/lib/libssl.a"CORE_LIBS="$CORE_LIBS $OPENSSL/lib/libcrypto.a"./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-openssl=/usr/local/openssl/
make && make install转载于:https://blog.51cto.com/yenokia/2083065