确保安装了 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. windows下开启远程连接Mysql

    使用“Ctrl + R”组合键快速打开cmd窗口,并输入“cmd”命令,打开cmd窗口.  使用“mysql -uroot -proot”命令可以连接到本地的mysql服务.  使用“use mysq ...

  2. [HDU3072]:Intelligence System(塔尖+贪心)

    题目传送门 题目描述 “这一切都是命运石之门的选择.”试图研制时间机器的机关SERN截获了中二科学家伦太郎发往过去的一条短 信,并由此得知了伦太郎制作出了电话微波炉(仮).为了掌握时间机器的技术,SE ...

  3. 3.并发编程-ReentrantLock 细节说明

    并发编程-ReentrantLock 细节说明 ---title: 并发编程-ReentrantLock 细节说明date: 2018-07-05 09:06:57categories: - 并发编程 ...

  4. java生成二维码学习笔记

    纠错等级: QRErrorCorrectLevel.L 7%的字码可被修正 QRErrorCorrectLevel.M 15%的字码可被修正 QRErrorCorrectLevel.Q 25%的字码可 ...

  5. POJO / Javabean / Entity Bean

    POJO 和JavaBean是我们常见的两个关键字,一般容易混淆,POJO全称是Plain Ordinary Java Object / Pure Old Java Object,中文可以翻译成:普通 ...

  6. IView入门练习~CDN模式全局加载JS

    关于 iView iView 是一套基于 Vue.js 的开源 UI 组件库,主要服务于 PC 界面的中后台产品. 特性 高质量.功能丰富 友好的 API ,自由灵活地使用空间 细致.漂亮的 UI 事 ...

  7. python调用c++/c 共享库,开发板上编译的一些坑!

    1.对于python,ctypes只能load动态库,但现在我的对象是一个静态库,而且我没有源代码,静态库在编译过程中没有加--fPIC参数,所以我也没办法将其编译为动态库,有没有什么方法在pytho ...

  8. linux配置ssh公钥认证,打通root用户的免密码输入的scp通道

    1.ssh-keygen ssh-keygen是unix-like系统的一个用来生成.管理ssh公钥和私钥的工具. 2.用法 常用的重要的选项有: -b num   指定生成多少比特长度的key,单位 ...

  9. leetcode 342. 4的幂(python)

    1. 题目描述 给定一个整数 (32 位有符号整数),请编写一个函数来判断它是否是 4 的幂次方. 示例 1: 输入: 16输出: true示例 2: 输入: 5输出: false 2. 思路 参考: ...

  10. OpenStack Placement Project

    目录 文章目录 目录 背景 Placement 简介 基本概念 数据模型解析 Command Line Placement Web Application 的实现与分析 Placement 在启动虚拟 ...