• 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
  • 相关阅读:
    ByteBuffer的mark、position、limit、flip、reset,get方法介绍ok
    java.nio.ByteBuffer的flip、rewind和compact几个方法的区分使用
    maven之一:maven安装和eclipse集成
    Java 8 函数式接口
    Lambda 表达式
    jdk8十大新的特性
    阿里巴巴73款开源产品列表,值得收藏
    【Java】java.util.Objects 工具类方法研究
    ARIMA 模型简单介绍
    python 二维数组取值
  • 原文地址:https://www.cnblogs.com/enumx/p/12296906.html
Copyright © 2020-2023  润新知