9
编译时打开:--with-stream_geoip_module=dynamic
配置文件中加载:load_module "/usr/lib64/nginx/modules/ngx_stream_geoip_module.so";
# nginx -t 会无法通过,报错
nginx: [emerg] dlopen() "/usr/lib64/nginx/modules/ngx_stream_geoip_module.so" failed (/usr/lib64/nginx/modules/ngx_stream_geoip_module.so: undefined symbol: ngx_stream_add_variable) in /etc/nginx/nginx.conf:23
nginx: configuration file /etc/nginx/nginx.conf test failed
编译完整参数:
--prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-openssl=/usr/local/src/openssl --with-openssl-opt=enable-tls1_3 --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-stream=dynamic --with-stream_ssl_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-stream_ssl_preread_module --with-stream_sni --with-jemalloc --with-pcre --with-pcre-jit --with-cc-opt='-O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=native' --with-ld-opt='-Wl,-z,relro -Wl,-E' --add-dynamic-module=./modules/ngx_http_concat_module --add-dynamic-module=./modules/ngx_http_footer_filter_module --add-dynamic-module=./modules/ngx_http_proxy_connect_module --add-dynamic-module=./modules/ngx_http_reqstat_module --add-dynamic-module=./modules/ngx_http_sysguard_module --add-dynamic-module=./modules/ngx_http_trim_filter_module --add-dynamic-module=./modules/ngx_http_upstream_check_module --add-dynamic-module=./modules/ngx_http_upstream_consistent_hash_module --add-dynamic-module=./modules/ngx_http_upstream_dynamic_module --add-dynamic-module=./modules/ngx_http_upstream_dyups_module --add-dynamic-module=./modules/ngx_http_upstream_session_sticky_module --add-dynamic-module=./modules/ngx_http_user_agent_module --add-dynamic-module=./modules/ngx_slab_stat --add-dynamic-module=./modules/ngx_http_lua_module --add-dynamic-module=/usr/local/src/ngx_devel_kit --add-dynamic-module=./modules/ngx_http_slice_module
./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-openssl=/usr/local/src/openssl --with-openssl-opt='enable-tls1_3' --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-stream=dynamic --with-stream_ssl_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-stream_ssl_preread_module --with-stream_sni --with-jemalloc --with-pcre --with-pcre-jit --with-cc-opt='-O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=native' --with-ld-opt='-Wl,-z,relro -Wl,-E' --add-dynamic-module=./modules/ngx_http_concat_module --add-dynamic-module=./modules/ngx_http_footer_filter_module --add-dynamic-module=./modules/ngx_http_proxy_connect_module --add-dynamic-module=./modules/ngx_http_reqstat_module --add-dynamic-module=./modules/ngx_http_sysguard_module --add-dynamic-module=./modules/ngx_http_trim_filter_module --add-dynamic-module=./modules/ngx_http_upstream_check_module --add-dynamic-module=./modules/ngx_http_upstream_consistent_hash_module --add-dynamic-module=./modules/ngx_http_upstream_dynamic_module --add-dynamic-module=./modules/ngx_http_upstream_dyups_module --add-dynamic-module=./modules/ngx_http_upstream_session_sticky_module --add-dynamic-module=./modules/ngx_http_user_agent_module --add-dynamic-module=./modules/ngx_slab_stat --add-dynamic-module=./modules/ngx_http_lua_module --add-dynamic-module=/usr/local/src/ngx_devel_kit --add-dynamic-module=./modules/ngx_http_slice_module
- make install clean
- strip -g /usr/lib64/nginx/modules/*
- Tengine version (use
sbin/nginx -V
):
# nginx -V
Tengine version: Tengine/2.3.1
nginx version: nginx/1.16.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
built with OpenSSL 1.1.1b Tassl 0.2 26 Feb 2019
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-openssl=/usr/local/src/openssl --with-openssl-opt=enable-tls1_3 --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-stream=dynamic --with-stream_ssl_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-stream_ssl_preread_module --with-stream_sni --with-jemalloc --with-pcre --with-pcre-jit --with-cc-opt='-O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=native' --with-ld-opt='-Wl,-z,relro -Wl,-E' --add-dynamic-module=./modules/ngx_http_concat_module --add-dynamic-module=./modules/ngx_http_footer_filter_module --add-dynamic-module=./modules/ngx_http_proxy_connect_module --add-dynamic-module=./modules/ngx_http_reqstat_module --add-dynamic-module=./modules/ngx_http_sysguard_module --add-dynamic-module=./modules/ngx_http_trim_filter_module --add-dynamic-module=./modules/ngx_http_upstream_check_module --add-dynamic-module=./modules/ngx_http_upstream_consistent_hash_module --add-dynamic-module=./modules/ngx_http_upstream_dynamic_module --add-dynamic-module=./modules/ngx_http_upstream_dyups_module --add-dynamic-module=./modules/ngx_http_upstream_session_sticky_module --add-dynamic-module=./modules/ngx_http_user_agent_module --add-dynamic-module=./modules/ngx_slab_stat --add-dynamic-module=./modules/ngx_http_lua_module --add-dynamic-module=/usr/local/src/ngx_devel_kit --add-dynamic-module=./modules/ngx_http_slice_module
- OS (e.g. from /etc/os-release):
# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
- Kernel (e.g.
uname -a
):
Linux izj6c5lasa7ruhz7ca937jz 3.10.0-693.5.2.tcpa06.tl2 #1 SMP Tue Jun 19 11:31:55 CST 2018 x86_64 x86_64 x86_64 GNU/Linux
- Others: