热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Tengine动态模块扩展

Tengine安装tengine兼容nginx配置并启用模块ngx_http_concat_modulengx_http_concat_module该模块类似于apache中的mo

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

推荐阅读
  • MySQL5.6.40在CentOS764下安装过程 ... [详细]
  • 本文介绍了Hyperledger Fabric外部链码构建与运行的相关知识,包括在Hyperledger Fabric 2.0版本之前链码构建和运行的困难性,外部构建模式的实现原理以及外部构建和运行API的使用方法。通过本文的介绍,读者可以了解到如何利用外部构建和运行的方式来实现链码的构建和运行,并且不再受限于特定的语言和部署环境。 ... [详细]
  • linux clickhouse安装在指定目录_Centos8服务器指定目录安装配置Nginx
    1.安装前准备(1)检查是否安装过nginx(如果没有安装过可以无视)find-namenginx搜索nginx文件及其文件夹rm-rf【nginx配置地址文件及其文件夹】手动删除 ... [详细]
  • Nginx使用AWStats日志分析的步骤及注意事项
    本文介绍了在Centos7操作系统上使用Nginx和AWStats进行日志分析的步骤和注意事项。通过AWStats可以统计网站的访问量、IP地址、操作系统、浏览器等信息,并提供精确到每月、每日、每小时的数据。在部署AWStats之前需要确认服务器上已经安装了Perl环境,并进行DNS解析。 ... [详细]
  • 安装mysqlclient失败解决办法
    本文介绍了在MAC系统中,使用django使用mysql数据库报错的解决办法。通过源码安装mysqlclient或将mysql_config添加到系统环境变量中,可以解决安装mysqlclient失败的问题。同时,还介绍了查看mysql安装路径和使配置文件生效的方法。 ... [详细]
  • 本文介绍了Perl的测试框架Test::Base,它是一个数据驱动的测试框架,可以自动进行单元测试,省去手工编写测试程序的麻烦。与Test::More完全兼容,使用方法简单。以plural函数为例,展示了Test::Base的使用方法。 ... [详细]
  • 本文介绍了在Windows环境下如何配置php+apache环境,包括下载php7和apache2.4、安装vc2015运行时环境、启动php7和apache2.4等步骤。希望对需要搭建php7环境的读者有一定的参考价值。摘要长度为169字。 ... [详细]
  • Java在运行已编译完成的类时,是通过java虚拟机来装载和执行的,java虚拟机通过操作系统命令JAVA_HOMEbinjava–option来启 ... [详细]
  • 本文介绍了在CentOS上安装Python2.7.2的详细步骤,包括下载、解压、编译和安装等操作。同时提供了一些注意事项,以及测试安装是否成功的方法。 ... [详细]
  • Introduction(简介)Forbeingapowerfulobject-orientedprogramminglanguage,Cisuseda ... [详细]
  • Imdevelopinganappwhichneedstogetmusicfilebystreamingforplayinglive.我正在开发一个应用程序,需要通过流 ... [详细]
  • 对于一般的扩展包,我们一般直接pipinstallxxx即可安装,但是unrar直接安装后,发现并不能通过Python程序实现解压的功能& ... [详细]
  • linux下编译安装lnmp
    2019独角兽企业重金招聘Python工程师标准#######################安装依赖#####################安装必要的包:y ... [详细]
  • PHP编程能开发哪些应用?
    导读:很多朋友问到关于PHP编程能开发哪些应用的相关问题,本文编程笔记就来为大家做个详细解答,供大家参考,希望对大家有所帮助!一起来看看吧!本文目录一览: ... [详细]
  • mysql5.6 多实例 主从安装_MySQL5.6一主多从的半同步复制实例
    半同步简介:在默认情况下,MySQL的复制是异步的,这意味着主服务器及其从服务器是独立的。异步复制可以提供最佳的性能,因为主服务器在将更新 ... [详细]
author-avatar
汶汐_782
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有