zoukankan      html  css  js  c++  java
  • nginx安装

    1. 下载nginx软件:http://nginx.org/en/download.html,wget http://nginx.org/download/nginx-1.16.0.tar.gz
    2. 解压:tar -zxvf nginx-1.16.0.tar.gz
    3. 编译安装:./configure --prefix=/home/zx/nginx/
      1. 报错:
        ./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.

        解决:sudo apt-get install libpcre3 libpcre3-dev

      2. 报错:
        ./configure: error: the HTTP gzip module requires the zlib library.
        You can either disable the module by using --without-http_gzip_module
        option, or install the zlib library into the system, or build the zlib library
        statically from the source with nginx by using --with-zlib=<path> option.

        解决:下载zlib库: wget http://www.zlib.net/zlib-1.2.11.tar.gz,解压并安装:tar -zxvf zlib-1.2.11.tar.gz &&  cd zlib-1.2.11/ && make && make install

      3. sudo apt-get install openssl libssl-dev

    4. 再次编译:./configure --prefix=/home/zx/nginx/
      Configuration summary
        + using system PCRE library
        + OpenSSL library is not used
        + using system zlib library
      
        nginx path prefix: "/home/zx/nginx/"
        nginx binary file: "/home/zx/nginx//sbin/nginx"
        nginx modules path: "/home/zx/nginx//modules"
        nginx configuration prefix: "/home/zx/nginx//conf"
        nginx configuration file: "/home/zx/nginx//conf/nginx.conf"
        nginx pid file: "/home/zx/nginx//logs/nginx.pid"
        nginx error log file: "/home/zx/nginx//logs/error.log"
        nginx http access log file: "/home/zx/nginx//logs/access.log"
        nginx http client request body temporary files: "client_body_temp"
        nginx http proxy temporary files: "proxy_temp"
        nginx http fastcgi temporary files: "fastcgi_temp"
        nginx http uwsgi temporary files: "uwsgi_temp"
        nginx http scgi temporary files: "scgi_temp"
    5. 安装:make && make install
    6. 安装goaccess分析access.log日志:sudo apt-get install goaccess
    7. 安装certbot开启https访问:
      1. sudo apt-get install python-certbot-nginx
      2. certbot --nginx --nginx-server-root=/home/zx/nginx/conf/nginx.conf -d geektime.zx.pub
  • 相关阅读:
    'Undefined symbols for architecture i386,clang: error: linker command failed with exit code 1
    The codesign tool requires there only be one 解决办法
    XCode iOS project only shows “My Mac 64bit” but not simulator or device
    Provisioning profile XXXX can't be found 的解决办法
    UIView 中的控件事件穿透 Passthrough 的实现
    Xcode4.5出现时的OC新语法
    xcode 快捷键(持续更新)
    打越狱包
    php缓存与加速分析与汇总
    浏览器的判断
  • 原文地址:https://www.cnblogs.com/zx3212/p/10961638.html
Copyright © 2011-2022 走看看