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

    一、Centos版本:

      cat /etc/centos-release

      CentOS Linux release 7.1.1503 (Core)    

    二、nginx下载

      官网:http://nginx.org/

      版本:nginx-1.8.1.tar.gz

    三、安装

      解压:tar -xvf nginx-1.8.1.tar.gz

      移动到解压目录下

      ./configure

      报错:

      ./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

      报错:

      ./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.

      安装:

      yum install -y zlib-devel

      再次./configure

      

      成功。

      make

      make install

      cd /usr/local/nginx/sbin

      ./nginx

      

      成功!!!

  • 相关阅读:
    bzoj 2618: [Cqoi2006]凸多边形
    BZOJ 4556 [Tjoi2016&Heoi2016]字符串
    BZOJ 4850 [Jsoi2016]灯塔
    BZOJ 2956: 模积和
    PHP 正则表达式
    Linux Centos6.5安装redis3.0 和phpredis
    linux 删除过期文件
    THINKPHP报错 _STORAGE_WRITE_ERROR
    THINKPHP 部署nginx上URL 构造错误
    Linux 修改mysql密码
  • 原文地址:https://www.cnblogs.com/liuxinan/p/5220633.html
Copyright © 2011-2022 走看看