我无法为nginx编译“geoip2”。我的“.so”不起作用。
我的安装方式:
-
CD/opt/
-
sudo add apt repository ppa:maxmind/ppa&apt update&sudo apt安装libmaxminddb0 libmaxminddb dev mmdb bin
-
Git克隆
https://github.com/leev/ngx_http_geoip2_module.git
-
WGET
http://nginx.org/download/nginx-1.15.8.tar.gz
&tar xzfv nginx-1.15.8.tar.gz&cd nginx-1.15.8/
-
./configure--with compat--add dynamic module=/opt/ngx_http_geoip2_module&make&make安装
…测试!-f'/usr/local/nginx/modules/ngx_http_geoip2_module.so'.\
|| mv'/usr/local/nginx/modules/ngx_http_geoip2_module.so'.\
'/usr/local/nginx/modules/ngx_http_geoip2_module.so.old'cp
objs/ngx_http_geoip2_模块.so
'/usr/local/nginx/modules/ngx_http_geoip2_module.so'make[1]:离开
目录'/opt/nginx-1.15.8…
-
cp/usr/local/nginx/modules/ngx_http_geoip2_module.so/usr/share/nginx/modules/ngx_http_geoip2_module.so
-
添加线路加载模块“modules/ngx_http_geoip2_module.so”;在my nginx.conf中重新启动nginx。
重启后,我的nginx安装中没有加载geoip2
nginx版本:nginx/1.15.8使用openssl 1.1.1构建,2018年9月11日
(与OpenSSL 1.1.1a一起运行,2018年11月20日)启用TLS SNI支持
配置参数:-使用cc opt='-g-o2
-fdebug prefix map=/build/nginx-2czdma/nginx-1.15.8=。-fstack protector strong-wformat-werror=format security-fpic-wdate time-d戥u fortify戥u source=2'--具有ld opt='-wl,-b符号函数-wl,-z,relro-wl,-z,现在-fpic'--prefix=/usr/share/nginx--conf path=/etc/nginx/nginx.conf--http日志路径=/var/log/nginx/access.log--error日志路径=/var/log/nginx/error.log--lock路径=/var/lock/nginx.lock--pid路径=/run/nginx.pid--modules路径=/usr/lib/nginx/modules--http client body temp path=/var/lib/nginx/body--http fastcgi temp path=/var/lib/nginx/fastcgi--http代理temp path=/var/lib/nginx/proxy--http scgi temp path=/var/lib/nginx/scgi--http uwsgi temp path=/var/lib/nginx/uwsgi--with compat--with debug--with pcre jit--with-http_ssl_u模块--with-http_stub_status_模块--with-http_realip_模块--with-http_auth_request_模块--with-http_v2_模块--with-http_dav_模块--with-http_slice_模块--with threads--with-http_addition_模块--with-http_geoip_模块=dynamic--with-http_gunzip_模块--with-http_gzip_static_模块--with-http_image_filter_module=dynamic--with-http_sub_module--with-http_xslt_module=dynamic--with-stream_ssl_module--with-stream_ssl_preread_module--with-mail=dynamic--with-mail_ssl_module--add dynamic module=/build/nginx-2czdma/nginx-1.15.8/debian/modules/http-auth-pam
--添加动态模块=/build/nginx-2czdma/nginx-1.15.8/debian/modules/http-dav-ext
--添加动态模块=/build/nginx-2czdma/nginx-1.15.8/debian/modules/http-echo
--添加动态模块=/build/nginx-2czdma/nginx-1.15.8/debian/modules/http-upstream-fair
--添加动态模块=/build/nginx-2czdma/nginx-1.15.8/debian/modules/http-subs-filter
谁是我的失败或问题?