zoukankan      html  css  js  c++  java
  • Centos7 安装 Tengine

    yum install -y gcc gcc-c++

    PCRE.

    wget https://netix.dl.sourceforge.net/project/pcre/pcre/8.40/pcre-8.40.tar.gz
    tar -zxvf pcre-8.40.tar.gz
    cd pcre-8.40
    
    ./configure
    make && make install
    
    pcre-config --version

    OPENSSL.

    cd /usr/local/src
    wget http://www.openssl.org/source/openssl-1.0.2.tar.gz
    tar zxvf openssl-1.0.2.tar.gz
    cd openssl-1.0.2
    ./config
    make && make install

    ZLIB.

    cd /usr/local/src
    wget http://zlib.net/zlib-1.2.11.tar.gz
    tar zxvf zlib-1.2.11.tar.gz
    cd zlib-1.2.11
    ./configure

    make && make install

    HEADERS.

    cd /usr/local/src
    git clone https://github.com/openresty/headers-more-nginx-module.git

    TENGINE.

    cd /usr/local/src
    wget http://tengine.taobao.org/download/tengine-2.2.0.tar.gz
    tar -zxvf tengine-2.2.0.tar.gz
    cd tengine-2.2.0

    ./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/src/pcre-8.40
    --with-openssl=/usr/local/src/openssl-1.0.2
    --with-zlib=/usr/local/src/zlib-1.2.11
    --add-module=/usr/local/src/headers-more-nginx-module
    --with-http_v2_module


    make && make install

     Service.

    vim /lib/systemd/system/nginx.service
    
    [Unit]
    Description=The nginx HTTP and reverse proxy server
    After=syslog.target network.target remote-fs.target nss-lookup.target
    
    [Service]
    Type=forking
    PIDFile=/usr/local/nginx/logs/nginx.pid
    ExecStartPre=/usr/local/nginx/sbin/nginx -t
    ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    ExecReload=/bin/kill -s HUP $MAINPID
    ExecStop=/bin/kill -s QUIT $MAINPID
    PrivateTmp=true
    
    [Install]
    WantedBy=multi-user.target
    
    chmod 745 nginx.service
    
    systemctl enable nginx.service
  • 相关阅读:
    input file 多张图片上传 获取地址 ——fileReader
    15个常用的javaScript正则表达式
    sublime-emmet
    AMD-requireJS
    jQuery-lazyload参数
    easyui 查询条件form 数据遍历
    导出excel设置金额格式
    html5页面添加时间戳
    创建枚举
    定义实体转json需要方法
  • 原文地址:https://www.cnblogs.com/enumx/p/12296906.html
Copyright © 2011-2022 走看看