Nginx 添加扩展模块
Nginx 添加扩展模块
--add-module=../echo-nginx-module
- 查看当前nginx的编译
[root@test01 nginx-1.17.10]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.17.10
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/nginx --with-http_v2_module --with-http_ssl_module --with-http_sub_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-http_realip_module
- 上传并解压第三发扩展模块
tar zxvf echo-nginx-module-0.61.tar.gz
mv echo-nginx-module-0.61 echo-nginx-module
- 进入编译目录重新编译
cd nginx-1.17.10
./configure --prefix=/usr/local/nginx --with-http_v2_module --with-http_ssl_module --with-http_sub_module
--with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-http_realip_module
--add-module=../echo-nginx-module
- 安装更新
make && make install
make upgrade
- 查看new nginx 编码情况
[root@test01 nginx-1.17.10]# /usr/local/nginx/sbin/nginx -V