tengine动态模块扩展(代码片段)

author author     2022-12-15     430

关键词:

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

搭建高性能tengine(代码片段)

简介Tengine可以当成NginxPlus,它的健康检查、会话保持都比Nginx社区版做得更好。所以打算把线上的换成Tengine特性继承Nginx-1.17.3的所有特性,兼容Nginx的配置;支持HTTP的CONNECT方法,可用于正向代理场景;支持异步OpenSSL,可使用硬... 查看详情

centos7安装tengine终极篇

Centos7安装Tengine终极篇Tengine介绍Tengine是淘宝开发的基于nginx的应用服务器,反向代理服务器。它兼容nginx的所有配置,并且在其上增加了很多实用的功能,例如动态模块加载,集成lua语言进行扩展等,在性能方... 查看详情

centos7安装tengine终极篇

Centos7安装Tengine终极篇Tengine介绍Tengine是淘宝开发的基于nginx的应用服务器,反向代理服务器。它兼容nginx的所有配置,并且在其上增加了很多实用的功能,例如动态模块加载,集成lua语言进行扩展等,在性能方... 查看详情

淘宝的tengine下载(代码片段)

淘宝的Tengine下载Tengine的安装Tengine安装内置模块`footer_filter_modulem`Tengine的安装tengine是alibaba公司,在Nginx的基础上,开发定制,更加服务自己业务的服务器软件。后来进行了开源。tengine从2.3.0版本之后,tengine... 查看详情

tengine-2.3.1增加ngx_http_upstream_check_module模块(代码片段)

该模块在Tengine-1.4.0版本以前没有默认开启,它可以在配置编译选项的时候开启:./configure--with-http_upstream_check_module但是在1.4.0之后编译时默认开启的,但是在2.3.1版本时候默认取消了,需要以增加模块方式编译进去./configure--with-ht... 查看详情

tengine配置支持http2(代码片段)

1、检测目前tengine编译时候所用模块nginx-v2、补充好所需模块3、./configure--prefix=/usr/share/nginx--sbin-path=/usr/sbin/nginx--conf-path=/etc/nginx/nginx.conf--dso-tool-path=/usr/sbin/--error-log-path=/var/log/nginx/error.l 查看详情

tengine四层代理:(代码片段)

Tengine四层代理:1)安装tengine(nginx1.9以上版本编译以后要支持stream模块)1.1)tengine(nginx)一定要是nginx-1.9.X以上的版本,否则不支持stream功能:/data/nginx/sbin/nginx-VTengineversion:Tengine/2.3.2nginxversion:nginx/1.17.3builtbygcc4.8.520150623(RedHat4.8.5-39)(GC... 查看详情

tengine检查后端服务状态(代码片段)

ngx_http_upstream_check_module(http://tengine.taobao.org/document_cn/http_upstream_check_cn.html)该模块可以为Tengine提供主动式后端服务器健康检查的功能。该模块在Tengine-1.4.0版本以前没有默认开启,它可以在配置编译选项的时候开启:./configure--w... 查看详情

技术干货听阿里云cdn安防技术专家金九讲tengine+lua开发

... 二、安装 三、运行 四、开发  1.介绍Tengine:轻量级、高性能、高并发、配置化、模块化、可扩展、可移植的Web和反向代理服务器,Tengine是nginx超集,但做了很多优化,包含了很多比较有用的模块,比如直接包... 查看详情

编译安装tengine(代码片段)

TengineTengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。Tengine的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一... 查看详情

tengine安装,haproxy访问不同路径对接不同集群(代码片段)

tengine安装下载包:在官网http://tengine.taobao.org/download_cn.html下载各种版本的tengine包./configuremakemakeinstall将tengine设置为service服务cd/usr/lib/systemd/systemvinginx.service[Unit]Description=nginxperformancewebserv 查看详情

php博客扩展模块帖子(代码片段)

查看详情

lograte切割tengine日志(代码片段)

记录/srv/logs/nginx/*logcreate0644nobodynobodydailyrotate10missingoknotifemptycompresssharedscriptspostrotate/bin/kill-USR1`cat/srv/app/tengine/logs/nginx.pid2>/dev/null`2>/dev/null||trueendscrip 查看详情

centos7源码编译安装tengine(代码片段)

简介 Tengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。它的目的是打造一个高效、安全的Web平台。发展Tengine的性能和稳定性已经在大型的网站如淘宝网,天... 查看详情

ngx_http_image_filter_module模块安装配置

测试环境:Tengine2.1,centos6.9官网有说明,支持动态共享加载模块编译配置,指定加载为动态共享模块:wget http://tengine.taobao.org/download/tengine-2.1.0.tar.gz./configure  --prefix=/App/nginx --with-http_image_filter_modu 查看详情

tengine的安装与使用(代码片段)

0.环境和参考文档centos-6.5Tengine官网1.安装依赖yum-ygroupinstall"Developmenttools"yum-ygroupinstall"ServerPlatformDevelopment"yum-yinstallpcre-devel##编译时候提示安装的依赖yuminstall-ylibxslt-develyuminstall- 查看详情

haproxy实现7层代理(代码片段)

1.编译安装tengine,配置虚拟机,实现api.x.com代理9001端口1.1下载tengine[root@localhost~]#wgethttp://tengine.taobao.org/download/tengine-2.1.2.tar.gz--2020-07-2221:50:00--http://tengine.taobao.org/download/tengine-2.1.2.t 查看详情

tengine新增健康检查模块

            总结2.tengine的状态监控Tengine的状态监控有两种  这里演示一个健康检查模块功能配置一个status的locationlocation/status{       查看详情