确保安装了 gcc,openssl-devel,pcre-devel,zilb-devel

下载官网:http://nginx.org/

[root@localhost tools]#
wget http://nginx.org/download/nginx-1.6.3.tar.gz

--2017-10-21
10:43:52-- 
http://nginx.org/download/nginx-1.6.3.tar.gz

Resolving nginx.org...
95.211.80.227, 206.251.255.63, 2001:1af8:4060:a004:21::e3, ...

Connecting to
nginx.org|95.211.80.227|:80... connected.

HTTP request sent,
awaiting response... 302 Found

Location:
http://101.247.192.67/files/32230000052D57CD/nginx.org/download/nginx-1.6.3.tar

.gz
[following]--2017-10-21 10:43:53-- 
http://101.247.192.67/files/32230000052D57CD/nginx.org/download/

nginx-1.6.3.tar.gzConnecting
to 101.247.192.67:80... connected.

HTTP request sent,
awaiting response... 200 OK

Length: 805253 (786K)
[application/octet-stream]

Saving to:
“nginx-1.6.3.tar.gz”

100%[===============================================>]
805,253      840K/s   in 0.9s

2017-10-21 10:43:54
(840 KB/s) - “nginx-1.6.3.tar.gz” saved [805253/805253]

[root@localhost tools]#
ls

nginx-1.6.3.tar.gz

[root@localhost tools]#
mkdir -p /application/nginx

[root@localhost tools]#
ls

nginx-1.6.3.tar.gz

[root@localhost tools]#
tar -zxf nginx-1.6.3.tar.gz

[root@localhost tools]#
ls

nginx-1.6.3  nginx-1.6.3.tar.gz

[root@localhost tools]#
cd nginx-1.6.3

[root@localhost nginx-1.6.3]# useradd nginx -s
/sbin/nologin -M

[root@localhost
nginx-1.6.3]# ./configure \

> --with-http_stub_status_module
\

>
--prefix=/application/nginx \

>
--with-http_gzip_static_module \

> --user=nginx \

> --group=nginx \

[root@localhost
nginx-1.6.3]# make&&make install

[root@localhost nginx]#
ln -s /application/nginx /application/nginx-1.6.3

[root@localhost
application]# /application/nginx/sbin/nginx -t

nginx: the
configuration file /application/nginx/conf/nginx.conf syntax is ok

nginx: configuration
file /application/nginx/conf/nginx.conf test is successful

[root@localhost
application]# /application/nginx/sbin/nginx

[root@localhost /]# lsof -i :80

COMMAND  PID  USER  
FD   TYPE DEVICE SIZE/OFF NODE
NAME

nginx   6125  root   
6u  IPv4  22127     
0t0  TCP *:http (LISTEN)

nginx   6126 nginx    6u 
IPv4  22127      0t0 
TCP *:http (LISTEN)

 

#--with-http_stub_status_module 可以启用 nginx nginxstauts 功能,以监控 nginx 当前状态

linux Nginx 的安装的更多相关文章

  1. 11 linux nginx上安装ecshop 案例

    一: nginx上安装ecshop 案例 (1)解压到 nginx/html下 浏览器访问:127.0.0.1/ecshop/index.php 出现错误:not funod file 原因:ngin ...

  2. linux——nginx的安装及配置

    目录 1. 在Linux上安装nginx 2. 配置nginx反向代理 1. 在Linux上安装ngix 1.1 在以下网页下载nginx的tar包,并将其传到linux中 http://nginx. ...

  3. [linux] [nginx] 一键安装web环境全攻略phpstudy版,超详细!

    找到运行中的服务器(实例). 打开这个主要是看它的IP,是公网ip,公网ip,公网ip,重要的事情说三遍. 接下来我们可以不用在阿里云上操作了,直接用客户端操作,这两个客户端就是Xshell 5和Xf ...

  4. [linux] Nginx编译安装错误error: the HTTP rewrite module requires the PCRE library

    nginx编译错误: 执行如下命令安装缺少的文件即可

  5. Linux Nginx环境安装配置redmine3.1

    作者博文地址:https://www.cnblogs.com/liu-shuai/ 环境: CentOS-6.5+Nginx-1.8.0+Redmine-3.1.1+Ruby-2.0 1.配置环境 1 ...

  6. Linux(Centos)之安装Nginx及注意事项

    1.Nginx的简单说明 a.  Nginx是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器,期初开发的目的就是为了代理电子邮件服务器室友:Igor Sysoev开发 ...

  7. linux/centos下安装nginx(rpm安装和源码安装)详细步骤

    Centos下安装nginx rpm包                                                                                 ...

  8. Linux下Nginx的安装、升级及动态添加模块

    系统基于ubuntu server 14.04.4 amd64 安装 第一步 下载并解压Nginx压缩包 从Nginx官网下载Nginx,或者在Linux上执行wget http://nginx.or ...

  9. Linux下,Nginx的安装、升级及动态添加模块

    系统基于ubuntu server 14.04.4 amd64 安装 第一步 下载并解压Nginx压缩包 从Nginx官网下载Nginx,或者在Linux上执行wget http://nginx.or ...

随机推荐

  1. 关于项目中的一些经验:封装activity、service的基类,封装数据对象

    经验一,将几个页面公用的数据,和方法进行封装,形成一个baseActivity的类: package com.ctbri.weather.control; import java.util.Array ...

  2. springboot学习日志(二)-- thymeleaf学习

    本次学习如何使用thymeleaf以及相关语法1.在上一章写的那样 引入jar包到maven工程 <dependency> <groupId>org.springframewo ...

  3. 关于servlet-api.jar和jsp-api.jar的选择和使用

    选择哪个依赖 javax包下都是jdk提供接口规范,由第三方服务器厂商自己来实现. jsp-api的依赖发生如下了2次迁移: javax.servlet.jsp-api==>javax.serv ...

  4. java8 stream初试,map排序,list去重,统计重复元素个数,获取map的key集合和value集合

    //定义一个100元素的集合,包含A-Z List<String> list = new LinkedList<>(); for (int i =0;i<100;i++) ...

  5. @清晰掉 c语言三"巨头" const:volatile:static

    const: 1.如果把const放在变量类型前,说明这个变量的值是保持不变的(即为常量),改变量必须在定义时初始化,初始化后对她的任何赋值都是非法的. 2.当指针或是引用指向一个常量时,必须在类型名 ...

  6. modern php笔记---1、新时代的php

    modern php笔记---1.新时代的php 一.总结 一句话总结: php有Zend Engine 和 Facebook开发的 HipHop Virtual Machine两套引擎 1.php也 ...

  7. leetcode-mid-math-202. Happy Number-NO

    mycode 关键不知道怎么退出循环.............其实只要有一个平方和以前出现过,那么整个计算过程就会重复 参考: class Solution(object): def isHappy( ...

  8. 7、Shiro加密和加盐

    这里我们以md5加密方法举例,首先我们写一个main方法测试我们的密码经过md5加密之后的得到什么样的字符串: /** * 书写方法测试Md5Hash将密码“houru”加密之后的密文 * 但是仅仅加 ...

  9. Openstack 实现技术分解 (3) 开发工具 — VIM & dotfiles

    目录 目录 前文列表 扩展阅读 前言 插件管理 Vundle 主题 Solarized 浏览项目目录结构 Nerdtree Symbol 窗口 Tagbar 文件模糊查询 CtrlP 代码补全 You ...

  10. delphi 每英寸相素点取值偏差

    在所有资料中,每英寸相素点之比一般是这两个值,即:0.0393700788  25.399999961392 但是在GDI编程中,却遇到LOGPIXELSX  LOGPIXELSY 在取值为96DPI ...