1.yum install  pcre*

2.wget http://nginx.org/download/nginx-1.7.8.tar.gz

3.tar -zxvf nginx-1.7.8.tar.gz

4. ./configure --prefix=/usr/local/nginx-1.7.8 --with-http_ssl_module --with-http_spdy_module --with-http_stub_status_module --with-pcre

5. make

6. make install

7. /usr/local/nginx-1.7.8/sbin/nginx -s reload  //重启

解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误

解决方法:
[root@localhost nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
 

nginx非80端口配置 外网无法访问

解决办法

执行 service iptables stop 把防火墙关闭

centos搭建nginx环境的更多相关文章

  1. Centos搭建nginx环境,编译,添加服务,开机启动。

    首先安装所需的安装库,yum -y install gcc gcc-c++ autoconf libtool* openssl openssl-devel 编译的时候,若有提示错误,提示缺少某个库,y ...

  2. Docker学习之搭建nginx环境

    前言 很久没写随笔了,今天我们来学习一下如何在docker搭建nginx环境吧! 一:下载镜像,使用docker pull拉取最新的nginx镜像 命令:docker pull nginx 查看镜像: ...

  3. 基于centos搭建nginx+uwsgi运行django环境

    环境: CentOS 7 nginx/1.9.12 Python 2.7.5 一:安装依赖包5 yum install zlib-devel bzip2-devel pcre-devel openss ...

  4. 【Nginx(一)】Centos下 Nginx环境搭建

    Nginx环境搭建 系统环境: 腾讯云 Linux Centos7 1.下载nginx压缩包 ,上传到腾讯云服务器 http://nginx.org/en/download.html 或者使用dock ...

  5. 1.5准备CentOS和Nginx环境「深入浅出ASP.NET Core系列」

    准备CentOS 1.1虚拟机 CentOS的安装这里使用vmware workstation 14来做虚拟机,当然你也可以用Oracle的虚拟机或者不用虚拟机,使用云服务或者使用双系统,不是什么大问 ...

  6. 基于Centos搭建Jenkins 环境搭建

    系统要求: CentOS 7.2 64 位操作系统 安装 Jenkins Jenkins 简介 Jenkins 是一个开源软件项目,是基于Java开发的一种持续集成工具,用于监控持续重复的工作,旨在提 ...

  7. Centos搭建go环境以及go入门

    引言 本文主要聚焦于 如何在centos上搭建go环境以及go入门, 包括搭建go环境,hello world运行, 创建包等操作,初步入门go语言. 安装环境 在管理员权限下, 也就是root用户 ...

  8. Centos搭建 Docker 环境

    搭建 Docker 环境 安装与配置 Docker 安装 Docker Docker 软件包已经包括在默认的 CentOS-Extras 软件源里.因此想要安装 docker,只需要运行下面的 yum ...

  9. Linux(CentOS)上面搭建Nginx环境

    总体上来说,Linux 这个系统其实挺好用的 除了看不见界面,但是用起来确实是比Window好用太多了,不废话了,直接说搭建环境的步骤! 安装Nginx 编译运行时的环境 参考博客:http://ww ...

随机推荐

  1. Learning BSD.sys/queue.h

    This file includes 4 data-structures.. Insteresting because they are written in 1994.. to make it ea ...

  2. mongodb type it for more

    当使用MongoChef Core 链接mongodb的时候 ,需要查看更多的数据时候,系统提示  type it for more 可以设置系统参数 DBQuery.shellBatchSize = ...

  3. form表单验证提示语句

    <input id="idcardcode" name="idcardcode" class="form-control"       ...

  4. javaScript中的一些知识

    利用js动态生成table <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http ...

  5. C++ 隐式类类型转换和转换操作符

    隐式类类型转换 C++语言定义了内置类型之间的几个自动转换.也可以定义如何将其他类型的对象隐式转换为我们的类类型,或将我们的类类型的对象隐式转换为其他类型.为了定义到类类型的隐式转换,需要定义合适的构 ...

  6. Entity Framework技巧系列之三 - Tip 9 – 12

    提示9. 怎样直接删除一个对象而无需检索它 问题 最常见的删除Entity Framework中实体的方式是将你要删除的实体传入Context中并像如下这样删除: 1 // 按ID查找一个类别 2 / ...

  7. 通过配置的方式Autofac(1)

    一.基本配置 1.通过配置的方式使用Autofac <?xml version="1.0"?> <configuration> <configSect ...

  8. 解决Xcode 9.2系统真机测试时出现 could not find developer disk image问题

    解决Xcode在ipad/iphone 9.2 系统真机测试时出现could not find developer disk image问题 第一种方法:拷贝这个文件(http://download. ...

  9. Global事件执行顺序

    Global.asax 文件,有时候叫做 ASP.NET 应用程序文件,提供了一种在一个中心位置响应应用程序级或模块级事件的方法.你可以使用这个文件实现应用程序安全性以及其它一些任务.下面让我们详细看 ...

  10. json解析尖括号<>

    如题 rs.getString("HEADLINE").replaceAll("<", " <").replaceAll(&qu ...