Linux 下源码安装ngnix

版本说明:
NGINX 版本1.12.0
pcre-8.40
zlib-1.2.11
openssl-1.1.0i
 
安装过程
#
./configure  --prefix=/usr/ngnix  --with-http_stub_status_module --with-pcre=/opt/ngnix/pcre-8.40 --with-zlib=/opt/ngnix/zlib-1.2.11  --with-stream
make && make install
 
注:1、增加--with-openssl=/opt/ngnix/openssl-1.1.1
       报错:(未解决)
objs/ngx_modules.o \
-ldl -lpthread -lcrypt /opt/ngnix/pcre-8.40/.libs/libpcre.a /opt/ngnix/openssl-1.1.1/.openssl/lib/libssl.a /opt/ngnix/openssl-1.1.1/.openssl/lib/libcrypto.a -ldl /opt/ngnix/zlib-1.2.11/libz.a \
-Wl,-E
/opt/ngnix/openssl-1.1.1/.openssl/lib/libcrypto.a(threads_pthread.o): In function `fork_once_func':
threads_pthread.c:(.text+0x16): undefined reference to `pthread_atfork'
collect2: error: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/opt/ngnix/nginx-1.12.0'
make: *** [build] Error 2
 
解决:由于openssl 版本问题,换用openssl-1.1.0i   正常。
./configure  --prefix=/usr/ngnix  --with-http_stub_status_module --with-pcre=/opt/ngnix/pcre-8.40 --with-zlib=/opt/ngnix/zlib-1.2.11  --with-stream --with-http_ssl_module --with-openssl=/opt/ngnix/openssl-1.1.0i
 
 
 
posted on 2018-10-31 14:16  浊酒三杯  阅读(1739)  评论(4编辑  收藏  举报