openresty 添加第三方模块,openresty第三方
openresty 添加第三方模块,openresty第三方
由于工作需要,在nginx开发过程中遇到了问题,需要添加第三方模块,在网上浏览了很多帖子教程,结果都不成功。
1.下载安装包
我下载的是zip包,解压缩到当前文件夹
2.配置
进入openresty源码包,执行命令
./configure --prefix=/usr/local/openresty --add-module=/root/ngx_http_substitutions_filter_module-master
prefix后面是openresty的安装目录,添加模块,后面跟的是我解压的文件夹位置
执行过程中可以看到该模块已经配置成功
3.make
在配置完成可以看到末尾要求执行两条命令gmake和gmake install 按顺序执行即可
4.检查
如何查看是否安装成功呢?
[root@iZ23ajtlkiqZ nginx]# ./sbin/nginx -V
nginx version: openresty/1.9.3.1
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.2.19
--add-module=../echo-nginx-module-0.58 --add-module=../xss-nginx-module-0.05 --add-module=../ngx_coolkit-0.2rc3
--add-module=../set-misc-nginx-module-0.29 --add-module=../form-input-nginx-module-0.11 --add-module=../encrypted-session-nginx-module-0.04
--add-module=../srcache-nginx-module-0.30 --add-module=../ngx_lua-0.9.16 --add-module=../ngx_lua_upstream-0.03
--add-module=../headers-more-nginx-module-0.26 --add-module=../array-var-nginx-module-0.04 --add-module=../memc-nginx-module-0.16
--add-module=../redis2-nginx-module-0.12 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.14
--add-module=../rds-csv-nginx-module-0.06 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib
<span ><strong><span >--add-module=/root/ngx_openresty-1.9.3.1/bundle/ngx_http_substitutions_filter_module-master
</span></strong></span> --with-http_ssl_module
我们可以看到该模块已经成功添加
评论暂时关闭