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

    下载、安装

    • 依次执行下列命令:

      `
      cd /usr/local/src/
      
      wget http://nginx.org/download/nginx-nginx-1.10.1.tar.gz
      
      tar zxvf nginx-1.10.1.tar.gz -C /usr/local
      
      cd /usr/local/nginx-1.10.1/
      
      ./configure
      
      `
      
    • 问题:

    ./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-httprewritemodule option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre= option

    安装依赖

    $ yum install gcc-c++
    $ yum install pcre pcre-devel
    $ yum install zlib zlib-devel
    $ yum install openssl openssl--devel

    再次安装nginx

    cd /usr/local/nginx-1.10.1/ ./configure make && make install

    测试是否可用

    cd /usr/local/nginx/sbin ./nginx

    • 如果出现如下问题: ` nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) nginx: [emerg] still could not bind()

      `

    • 查看80端口占用情况

    netstat -ntpl pkill -9 nginx 再次启动./nginx

    • 也有可能是防火墙的问题,查看ip是否可以ping通,端口是否开放

    升级python后导致yum不可用

    vi /usr/bin/yum

    修改python头部python为python2.7.5

  • 相关阅读:
    javascript异步编程系列【十】—Jscex+Easeljs制作坦克大战
    博客园分页JQuery打造的分页无刷新的Repeater
    参赛作品
    摄像机、投影、3D旋转、缩放
    javascript异步编程系列【八】Jscex版火拼俄罗斯
    javascript异步编程系列【七】扫盲,我们为什么要用Jscex
    javascript异步编程系列【五】Jscex制作愤怒的小鸟
    javascript异步编程系列【六】Jscex版愤怒的小鸟之冲锋陷阵鸟
    每周优秀代码赏析—Jscex内核【一】
    javascript异步编程系列【一】用Jscex画圆
  • 原文地址:https://www.cnblogs.com/tianboblog/p/7095845.html
Copyright © 2011-2022 走看看