打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Openresty 安装nginx_upstream_check_module

以下仅作为个人实际实验结果记录,仅供参考。具体步骤没写,网上很多也很详细

-----------------------------------------------------------

Openresty 官网地址: http://openresty.org/en/download.html

下载需要的版本。

解压

wget https://openresty.org/download/openresty-1.13.6.1.tar.gz

tar -zxvf xxxx

下载nginx_upstream_check_module

git地址: https://github.com/yaoweibin/nginx_upstream_check_module

 

unzip xxx

打补丁:(官方有写部分内容)

 patch -p1 </path/to/nginx_http_upstream_check_module/check.patch

根据对应的nginx版本来选择对应的patch,但是我装的openresty-1.13.6.1似乎没有对应的包,用了12的,但是还是提示找不到,然后就直接回车了。(后面直接安装也没问题,萌新求解)

======

网友解答: https://www.oschina.net/question/2459866_2145514 

======

 

编译安装:

./configure--prefix=/opt/openresty/releases/openresty-1.13.6.1--with-openssl=bundle/openssl-1.0.2h --with-pcre=bundle/pcre-8.41  --with-http_stub_status_module--http-client-body-temp-path=tmp/client_body_temp --http-proxy-temp-path=tmp/proxy_temp--http-fastcgi-temp-path=tmp/fastcgi_temp --http-uwsgi-temp-path=tmp/uwsgi_temp--http-scgi-temp-path=tmp/scgi_temp --add-module=./nginx_upstream_check_module

 

可以对比一下:下面是我安装好后的结果;

Nginx -V

nginxversion: openresty/1.13.6.1

builtby gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)

builtwith OpenSSL 1.0.2h  3 May 2016

TLSSNI support enabled

configurearguments: --prefix=/opt/openresty/releases/openresty-1.13.6.1/nginx--with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.3.0--add-module=../echo-nginx-module-0.61 --add-module=../xss-nginx-module-0.05--add-module=../ngx_coolkit-0.2rc3 --add-module=../set-misc-nginx-module-0.31--add-module=../form-input-nginx-module-0.12--add-module=../encrypted-session-nginx-module-0.07--add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.11--add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33--add-module=../array-var-nginx-module-0.05--add-module=../memc-nginx-module-0.18 --add-module=../redis2-nginx-module-0.14--add-module=../redis-nginx-module-0.3.7--add-module=../rds-json-nginx-module-0.15 --add-module=../rds-csv-nginx-module-0.08--add-module=../ngx_stream_lua-0.0.3--with-ld-opt=-Wl,-rpath,/opt/openresty/releases/openresty-1.13.6.1/luajit/lib--with-openssl=/root/openresty-1.13.6.1/bundle/openssl-1.0.2h--with-pcre=/root/openresty-1.13.6.1/bundle/pcre-8.41--with-http_stub_status_module--http-client-body-temp-path=tmp/client_body_temp--http-proxy-temp-path=tmp/proxy_temp --http-fastcgi-temp-path=tmp/fastcgi_temp--http-uwsgi-temp-path=tmp/uwsgi_temp --http-scgi-temp-path=tmp/scgi_temp--add-module=/root/openresty-1.13.6.1/nginx_upstream_check_module --with-stream--with-stream_ssl_module --with-http_ssl_module

一般nginx(或者是tengine)nginx -V给出的都是自定义安装的模块,默认安装的模块在可以通过./configure --help查看--without的都是

但是呢,openresty却不是!自定义和系统部分默认的都在这儿显示!!特别坑爹。导致萌新的我在新增模块的时候全部加上nginx -V的模块./configure没错,在make就一直抱各种错误。后来才发现。

 

PS:./configure  后面跟的目录最后一个最好不加/,否则后面nginx -V会出现//的效果,虽然没有影响

 

 附件:

nginx_upstream_check_module 使用方法:官网

nginx第三方模块

查看默认模块


 

 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Nginx參考
CentOS 7.3 安装配置 Nginx
centos编译安装nginx,及其编译参数解析
CentOS 7 安装Nginx
编译安装nginx遇到的问题
应对小规模DDOS:使用nginx_lua打造PHP应用防火墙
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服