zoukankan      html  css  js  c++  java
  • Linux 源码安装nginx

    编译参数详解:https://www.cnblogs.com/houyongchong/p/compileArgs.html

    配置参数详解:https://www.cnblogs.com/houyongchong/p/configureArgs.html

    安装扩展、依赖包

    tar -zxf LuaJIT-2.0.5.tar.gz -C /usr/local/src/
    cd LuaJIT-2.0.5/
    make
    make install
    export LUAJIT_LIB=/usr/local/lib
    export LUAJIT_INC=/usr/local/include/luajit-2.0
    
    tar -zxf nginx-sticky-module-1.1.tar.gz -C /usr/local/src/
    
    tar -zxf ngx_cache_purge-2.3.tar.gz -C /usr/local/src/
    
    tar xf pcre-8.40.tar.gz -C /usr/local/src/
    
    tar -zxf lua-nginx-module-0.10.8.tar.gz -C /usr/local/src/
    
    tar -zxf nginx_upstream_check_module-0.3.0.tar.gz -C /usr/local/src/
    
    tar -zxf ngx_devel_kit-0.3.0.tar.gz -C /usr/local/src/
    
    tar -zxf set-misc-nginx-module-0.31.tar.gz -C /usr/local/src/
    
    tar -zxf openssl-1.0.2l.tar.gz -C /usr/local/src/
    
    tar -zxf zlib-1.2.11.tar.gz -C /usr/local/src/
    
    unzip nginx-upstream-fair-master.zip
    mv nginx-upstream-fair-master /usr/local/src/
    
    chown -R root.root /local/src/

    安装nginx

    useradd -M -s /sbin/nologin nginx
    tar -zxf nginx-1.10.3.tar.gz
    chown -R root.root ./nginx-1.10.3
    cd nginx-1.10.3
    ./configure 
        --prefix=/app/nginx 
        --conf-path=/app/nginx/conf/nginx.conf 
        --sbin-path=/app/nginx/sbin/nginx 
        --http-log-path=/app/nginx/logs/access.log 
        --error-log-path=/app/nginx/logs/error.log 
        --pid-path=/app/nginx/logs/nginx.pid 
        --lock-path=/app/nginx/logs/nginx.lock 
        --with-ld-opt=-Wl,-rpath,/usr/local/lib 
        --with-pcre=/usr/local/src/pcre-8.42 
        --with-zlib=/usr/local/src/zlib-1.2.11 
        --with-openssl=/usr/local/src/openssl-1.0.2n 
        --add-module=/usr/local/src/nginx_upstream_check_module-0.3.0 
        --add-module=/usr/local/src/nginx-sticky-module 
        --add-module=/usr/local/src/nginx-upstream-fair-master 
        --add-module=/usr/local/src/ngx_cache_purge-2.3 
        --add-module=/usr/local/src/lua-nginx-module-0.10.13 
        --add-module=/usr/local/src/ngx_devel_kit-0.3.0 
        --add-module=/usr/local/src/set-misc-nginx-module-0.32 
        --with-http_addition_module 
        --with-http_dav_module 
        --with-http_flv_module 
        --with-http_gzip_static_module 
        --with-http_realip_module 
        --with-http_stub_status_module 
        --with-http_ssl_module 
        --user=nginx 
        --group=nginx
    make
    make install
    chown -R nginx.nginx /app/nginx
  • 相关阅读:
    <c:forEach 的常用整理
    <div>
    HTML <td> 标签的 rowspan 属性
    ap-client.xml要配
    @Autowired
    hasResultError
    使用 EclEmma 进行覆盖测试
    IE调试网页之三:使用 F12 工具控制台查看错误和状态 (Windows)
    different between<A Href> and <jsp: forward>
    <button>与<input type="button">的区别
  • 原文地址:https://www.cnblogs.com/houyongchong/p/nginx.html
Copyright © 2011-2022 走看看