Nginx安装

作者: StrongZhao | 来源:发表于2017-09-24 12:57 被阅读119次

    Nginx安装

    软件列表

    名称 版本 作用
    pcre 8.41 支持重写rewrite
    zlib 1.2.11 支持gzip压缩
    nginx 1.13.5 高性能的HTTP和反向代理服务器

    ps:参考官网http://nginx.org/en/docs/configure.html

    软件安装

    • pcre库安装
    //软件下载
    wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.gz
        
    //解压
    tar -zxvf pcre-8.41.tar.gz -C /usr/local/src
        
    //进入/usr/local/src/pcre-8.41目录下执行编译命令
    ./configure
    make && make install
    
    • zlib库安装
    //软件下载
    wget http://zlib.net/zlib-1.2.11.tar.gz 
        
    //解压
    tar -zxvf zlib-1.2.11.tar.gz -C /usr/local/src
        
    //进入/usr/local/src/zlib-1.2.11目录下执行编译命令
     ./configure
     make && make install
    
    • nginx安装
    //软件下载
    wget http://nginx.org/download/nginx-1.13.5.tar.gz
        
    //解压
    tar -zxvf nginx-1.13.5.tar.gz -C /usr/local/src
        
    //进入/usr/local/src/nginx-1.13.5目录下执行编译命令
    ./configure --sbin-path=/usr/local/nginx/nginx 
    --conf-path=/usr/local/nginx/nginx.conf 
    --pid-path=/usr/local/nginx/pid/nginx.pid 
    --with-http_ssl_module 
    --with-pcre=/usr/local/src/pcre-8.41 
    --with-zlib=/usr/local/src/zlib-1.2.11
    --with-select_module 
    --with-poll_module 
    --with-pcre-jit
    
     make && make install
     
     //启动nginx服务
     cd /usr/local
     nginx/nginx #启动服务
    

    相关文章

      网友评论

        本文标题:Nginx安装

        本文链接:https://www.haomeiwen.com/subject/zlekextx.html