Tengine动态模块扩展
2019-06-01 17:23
2416 查看
Tengine
- 安装tengine兼容nginx配置并启用模块ngx_http_concat_module
- ngx_http_concat_module 该模块类似于apache中的mod_concat模块,用于合并多个文件在一个响应报文中。
- --with-http_concat_module enable ngx_http_concat_module 静态模块
- --with-http_concat_module=shared enable ngx_http_concat_module (shared) 动态模块
2.安装
yum install -y vim lrzsz tree screen psmisc lsof tcpdump wget ntpdate gcc gcc-c++ glibc glibc-devel pcre pcre-devel openssl openssl-devel systemd-devel net-tools iotop bc zip unzip zlib-devel bash-completion nfs-utils automake libxml2 libxml2-devel libxslt libxslt-devel perl perl-ExtUtils-Embed
cd /usr/local/src
wget http://tengine.taobao.org/download/tengine-2.1.2.tar.gz
cd tengine-2.1.2
查询nginx的配置,并删掉不支持的模块
/apps/nginx/sbin/nginx -V
在tengine-2.1.2目录下编译安装
./configure --prefix=/apps/tengine --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --add-module=/usr/local/src/echo-nginx-module make && make install
在tengine配置文件中导入nginx配置文件
vim /apps/tengine/conf/nginx.conf include /apps/nginx/conf/server/*.conf; }
3.将ngx_http_concat_module静态直接编译到tengine
./configure --prefix=/apps/tengine --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --add-module=/usr/local/src/echo-nginx-module --with-http_concat_module make && make install
在配置文件location中打开concat模块
concat on; /apps/tengine/sbin/nginx -t /apps/tengine/sbin/nginx -s start
4.删除tengine重新安装tengine,ngx_http_concat_module动态直接编译到tengine
在tengine-2.1.2目录下编译安装
./configure --prefix=/apps/tengine --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --add-module=/usr/local/src/echo-nginx-module make && make install
在tengine配置文件中导入nginx配置文件
vim /apps/tengine/conf/nginx.conf include /apps/nginx/conf/server/*.conf; }
将ngx_http_concat_module动态模块编译到安装目录
- 动态模块可在不停止tengine(nginx),在配置文件中直接调用模块重新载入配置文件完成对tengine的功能扩展
./configure --prefix=/apps/tengine --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --add-module=/usr/local/src/echo-nginx-module --with-http_concat_module=shared make dso_install ll /apps/tengine/modules/ rwxr-xr-x 1 root root 93264 Jun 1 10:42 ngx_http_concat_module.so vim /apps/tengine/conf/nginx.conf dso { load ngx_http_concat_module.so; } /apps/tengine/sbin/nginx -t /apps/tengine/sbin/nginx -s start
相关文章推荐
- apache静态编译和动态编译的理解以及用apache扩展模块的安装
- PHP动态扩展模块
- LAMP(php动态扩展模块,httpd的rewrite,php错误日志,php.ini配置详解)
- 动态添加php扩展模块
- linux下apache2.2用apxs动态安装扩展模块
- PHP扩展开发之动态加载so模块与静态重编译PHP(下)
- lnmp下用phpize动态安装PHP模块/扩展(不需要重装PHP)
- nginx平滑升级、在线添加模块(tengine 动态加载模块)
- apxs动态安装扩展模块
- Centos 7(Linux)环境下安装PHP(编译添加)相应动态扩展模块so(以openssl.so为例)
- php动态扩展bcmath与sockets库模块
- LINUX下PHP编译添加相应的动态扩展模块so(不需要重新编译PHP,以openssl.so为例)
- LINUX下PHP编译添加相应的动态扩展模块so(不需要重新编译PHP,以openssl.so为例)
- PHP扩展开发之动态加载so模块与静态重编译PHP(上)
- PHP系列—动态添加php扩展模块
- [LAMP]php动态扩展模块安装
- php 动态扩展模块
- PHP安装动态扩展模块
- PHP动态扩展模块
- Centos 7(Linux)环境下安装PHP(编译添加)相应动态扩展模块so(以openssl.so为例)