Nginx第三方模块Ngx-dyups安装过程
Ngx-dyups是什么,能干什么
它是一个Nginx第三方动态Upstream配置模块,可以实现在不重启Nginx情况下动态更新反向代理Upstream表。该模块由淘宝开发团队维护,淘宝自家的Tengine中虽然没有直接集成该模块,但可以通过重新编译方式加进去。
源码地址
https://github.com/yzprofile/ngx_http_dyups_module
Ngx-dyups安装
1、下载第三方模块
git clone git://github.com/yzprofile/ngx_http_dyups_module.git
2、将第三方模块目录复制到最初Openresty下载解压缩目录下,当然,也可以放到任意目录下,只是这样编译时需要指定该目录。
[test@P-SH-Nginx-01 ~]$ cp -r ngx_http_dyups_module openresty-1.11.2.5
第一次就因为没做这一步复制,最后报错如下
adding module in /home/test/openresty-1.11.2.5/ngx_http_dyups_module
./configure: error: no /home/test/openresty-1.11.2.5/ngx_http_dyups_module/config was found
ERROR: failed to run command: sh ./configure --prefix=/usr/local/openresty/nginx \...
3、切换到Openresty最初下载解压缩目录下
[test@P-SH-Nginx-01]$ cd openresty-1.11.2.5
4、以管理员身份执行./configure --add-module,注意,必须以管理员身份,这个重新编译过程非常长
[test@P-SH-Nginx-01 openresty-1.11.2.5]$ sudo ./configure --add-module=./ngx_http_dyups_module
编译过程中会不停刷屏显示各种命令,都可以无视,但一定要注意最后的部分
…
adding module in ../rds-csv-nginx-module-0.07
+ ngx_http_rds_csv_filter_module was configured
adding module in /home/test/openresty-1.11.2.5/ngx_http_dyups_module
+ dyups module support lua
+ ngx_http_dyups_module was configured 这一句很关键,表示安装成功了
checking for PCRE library ... found
checking for PCRE JIT support ... found
…
5、以管理员身份执行make
[test@P-SH-Nginx-01 openresty-1.11.2.5]$ sudo make
6、如果Nginx进程仍启动中,则先关闭Nginx进程
7、切换到Make好的新文件所在目录
[test@P-SH-Nginx-01 openresty-1.11.2.5]$ cd build
[test@P-SH-Nginx-01 build]$ cd nginx-1.11.2
[test@P-SH-Nginx-01 nginx-1.11.2]$ cd objs
8、查看Nginx是否关闭了
[test@P-SH-Nginx-01 objs]$ ps -ef |grep nginx
test 98103 77025 0 05:35 pts/0 00:00:00 grep --color=auto nginx
9、将新的Nginx文件复制到目标目录
[test@P-SH-Nginx-01 objs]$ cp nginx /usr/local/openresty/nginx/sbin/
10、启动Nginx并查看是否新Module加进去了
[test@P-SH-Nginx-01 openresty]$ sudo ./nginx/sbin/nginx -c conf/nginx.conf
[test@P-SH-Nginx-01 openresty]$ sudo ./nginx/sbin/nginx -V
nginx version: openresty/1.11.2.5
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/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.06 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.10 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.32 --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.14 --add-module=../rds-csv-nginx-module-0.07 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --add-module=/home/test/openresty-1.11.2.5/ngx_http_dyups_module --with-http_ssl_module
Nginx第三方模块Ngx-dyups安装过程的更多相关文章
- nginx第三方模块安装方法
nginx第三方模块安装方法 ./configure --prefix=/你的安装目录 --add-module=/第三方模块目录 比如echo模块. 没安装前,使用测试. location /tes ...
- 如何安装nginx第三方模块
nginx文件非常小但是性能非常的高效,这方面完胜apache,nginx文件小的一个原因之一是nginx自带的功能相对较少,好在nginx允许第三方模块,第三方模块使得nginx越发的强大. 在安装 ...
- Nginx 第三方模块的安装以及一致性哈希算法的使用
Nginx 第三方模块的安装以及一致性哈希算法的使用 第三方模块安装方法总结: 以ngx_http_php_memcache_standard_balancer-master为例 1:解压 到 pat ...
- nginx添加模块 (非覆盖安装)
nginx添加模块(非覆盖安装) 原已经安装好的nginx,现在需要添加一个未被编译安装的模块: 查看原来编译时都带了哪些参数# /usr/local/nginx/sbin/nginx -V ngin ...
- 一些好用的nginx第三方模块
一些好用的nginx第三方模块 转自;http://macken.iteye.com/blog/1963301 1.Development Kit https://github.com/simpl/ ...
- node 中第三方模块的加载过程原理
node 中第三方模块的加载过程原理 凡是第三方模块都必须通过 npm 来下载 使用的时候就可以通过require('包名') 的方式来进行加载才可以使用 不可能有任何一个第三方包和核心模块的名字是一 ...
- centos 7.0 nginx 1.7.9成功安装过程
centos 7.0根目录 的目录构成 [root@localhost /]# lsbin dev home lib64 mnt proc run srv tmp varboot etc lib me ...
- nginx第三方模块---nginx-sticky-module的使用(基于cookie的会话保持)
目前的项目网站架构中使用了F5和nginx,F5用来做负载均衡,nginx只用作反向代理服务器.最近应客户的要求准备去掉F5,使用软负载.大家都知道nginx抗并发能力强,又可以做负载均衡,而且使用n ...
- (转) centos 7.0 nginx 1.7.9成功安装过程
centos 7.0根目录 的目录构成 [root@localhost /]# lsbin dev home lib64 mnt proc run srv tmp varboot etc lib me ...
随机推荐
- APP应用前端开发
1.开发手机APP前端要重视meta标签的编写: 2.注意HTML5标签在前端开发中的使用: 3.前端制作要舍弃CSS float属性(可flex布局),用绝对定位不利于页面布局的扩展: 4.APP前 ...
- vue-router实现原理及简易demo
自定义路由demo,git地址: git@github.com:xsk-walter/Vue-router.git 一.router基本使用 ① 创建和路由相关的组件 ②Vue.use(vueRout ...
- intelij idea 好用的插件
简介 记录一下平时使用的插件 Foldable ProjectView 隐藏目录或文件 One Dark theme 主题比较好用 Gitmoji Plus: Commit Button 在 comm ...
- 04 Springboot 格式化LocalDateTime
Springboot 格式化LocalDateTime 我们知道在springboot中有默认的json解析器,Spring Boot 中默认使用的 Json 解析技术框架是 jackson.我们点开 ...
- Linux系统执行命令方法
现在我们无论是工作中还是学习中很多情况下用到Linux系统,当我们需要在C#代码中调用类似与cmd窗口执行命令时候,就需要用到此方法 public static Process CommitComma ...
- AntdVue使用
AntdVue使用 配置与安装 #安装 npm install ant-design-vue --save #按需加载 import { Button, Layout, Row, Col, Menu, ...
- ML第2周学习小结
本周收获 总结一下本周学习内容: 1.复习了Numpy的一些基础操作,主要是利用numpy来对ndarray数组进行操作 我的博客链接: Numpy的一些操作 2.正在学习<深入浅出Pandas ...
- dotnet core 也能协调分布式事务啦!
2022 年 5 月 24 日,我们发布了 DBPack v0.1.0 版本,该版本主要 release 了分布式事务功能.在我们的规划里,DBPack 是要支持所有微服务开发语言协调分布式事务的,但 ...
- 怎么理解相互独立事件?真的是没有任何关系的事件吗?《考研概率论学习之我见》 -by zobol
1.从条件概率的定义来看独立事件的定义 2.从古典概率的定义来看独立事件的定义 3.P(A|B)和P(A)的关系是什么? 4.由P(AB)=P(A)P(B)推出"独立" 5.从韦恩 ...
- 记一次grpc server内存/吞吐量优化
背景 最近,上线的采集器忽然时有OOM.采集器本质上是一个grpc服务,网络设备通过grpc协议将数据上报后,采集器进行格式等整理后,发往下一个系统(比如分析,存储). 打开运行环境,发现特性如下: ...