zoukankan      html  css  js  c++  java
  • 编译安装Tengine

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

      官网:http://tengine.taobao.org

      官方文档:http://tengine.taobao.org/documentation_cn.html

      一、下载tengine到data下

    cd /data/
    wget
    http://tengine.taobao.org/download/tengine-2.1.2.tar.gz

      二、安装依赖包

    yum install gcc pcre-devel openssl-devel zlib-devel -y

      三、创建nginx用户

    useradd -r -s /sbin/nologin ngin
    

      四、解压缩

    tar xf tengine-2.1.2.tar.gz 

      五、进入tengine目录

    cd tengine-2.1.2

      六、编译安装

    ./configure --prefix=/apps/nginx --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 --with-http_concat_module 
    make && make install

     

      七、创键软链接

    ln -s /apps/nginx/sbin/nginx /usr/sbin/

      八、启动tengine服务

    nginx

      


     以共享模块方式编译

    ./configure --prefix=/apps/nginx --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 --with-http_concat_module=shared
    make dso_install

    查看编译成果

    [18:41:00 root@localhost tengine-2.1.2]#ls /apps/nginx/modules/ngx_http_concat_module.so 
    /apps/nginx/modules/ngx_http_concat_module.so

    编译

    make && make install

    修改主配置文件,引用模块

    vim /apps/nginx/conf/nginx.conf

    找到这行:

    #dso {
    #    load ngx_http_fastcgi_module.so;
    #    load ngx_http_rewrite_module.so;
    #}
    location / {
                root   html;
                index  index.html index.htm;
                concat on;
            }
    ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------- 博客均为个人笔记,无所追求,仅供参考~~~ QQ--2382990774
  • 相关阅读:
    九种常用排序的性能分析总结
    C语言输出格式总结
    线程安全的单例模式
    反射原理
    二进制的计算(计算机为什么采用补码存储数据)
    java程序员必须会的技能
    09网易校园招聘笔试题
    Spring获取ApplicationContext方式,和读取配置文件获取bean的几种方式
    【转】策略与机制分离
    VM PowerCli的简单安装和使用学习
  • 原文地址:https://www.cnblogs.com/alexlv/p/14871951.html
Copyright © 2011-2022 走看看