zoukankan      html  css  js  c++  java
  • nginx在centos下的安装

    第一步:
    打开浏览器下载,再上传到centOS系统中

    http://nginx.org/download/

    或者在 centOS系统输入:

    wget http://nginx.org/download/nginx-1.9.9.tar.gz
    

       

    第二步:解压

    tar -xvf nginx-1.9.9.tar.gz

    第三步:配置

    cd nginx-1.9.9
    ./configure --with-stream --with-http_stub_status_module --with-http_ssl_module

    如果出现
    ./configure: error: the HTTP rewrite module requires the PCRE library.
    You can either disable the module by using --without-http_rewrite_module
    option, or install the PCRE library into the system, or build the PCRE library
    statically from the source with nginx by using --with-pcre=<path> option.

    解决问题

    yum -y install pcre-devel

    如果出现
    ./configure: error: the HTTP cache module requires md5 functions
    from OpenSSL library. You can either disable the module by using
    --without-http-cache option, or install the OpenSSL library into the system,
    or build the OpenSSL library statically from the source with nginx by using
    --with-http_ssl_module --with-openssl=<path> options.

    解决办法:

    yum -y install openssl openssl-devel

    成功后,文件会编译到 /usr/local/nginx 这个目录下

    第四步:编译

    make
    make install

    参考:

    linux安装nginx
    https://www.cnblogs.com/jimisun/p/8057156.html
    
    Nginx配置upstream实现负载均衡
    https://www.cnblogs.com/zhoading/p/8036205.html
  • 相关阅读:
    (转) 解析 char *p和 char[]
    Linux下C程序内存、内存对齐问题 (实战)
    关于子网划分的两个例子
    子网掩码与子网划分 (转载)
    A、B、C类地址及子网掩码学习笔记
    本机ip、127.0.0.1和0.0.0.0区别(转载)
    初识const
    流媒体协议
    i2c-tools的使用方法
    linux ——内存共享映射mmap和munmap
  • 原文地址:https://www.cnblogs.com/ilovecpp/p/11655586.html
Copyright © 2011-2022 走看看