nginx添加第三方模块

1.查看nginx配置信息,

[root@VM_0_3_centos ~]# nginx -V
nginx version: openresty/1.15.8.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (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 -O2' --add-module=../ngx_devel_kit-0.3.1rc1 --add-module=../echo-nginx-module-0.61 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.15 --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.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.15 --add-module=../rds-csv-nginx-module-0.09 --add-module=../ngx_stream_lua-0.0.7 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -Wl,-rpath,/usr/local/openresty/luajit/lib' --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module  --with-stream --with-stream_ssl_preread_module

2.下载第三发模块,我安装的是nginx-http-flv-module-master 模块

wget  https://github.com/winshining/nginx-http-flv-module/archive/master.zip

3.进入原有的openresty目录,配置和编译。(./configure 之前的  --add-module 参数不用复制)[不用执行make install] 

./configure --prefix=/usr/local/openresty --with-cc-opt=-O2  --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module --add-module=/usr/local/src/download/nginx-http-flv-module-master
make

4.复制 /openresty-1.15.8.2/build/nginx-1.15.8/objs   中生成的 nginx二进制文件 到安装目录

 

5.停止nginx

6.重启

nginx -c /usr/local/openresty/nginx/conf/nginx.conf

 

 

 

posted on 2020-10-14 10:59  running-fly  阅读(783)  评论(0编辑  收藏  举报

导航