选择源码安装  下载安装包  nginx-1.8.0.tar.gz

  解压                     tar -zxvf  nginx-1.8.0.tar.gz 
  进入文件夹         [root@localhost local]# cd nginx-1.8.0
 
 

1. 开始安装             [root@localhost nginx-1.8.0]# ./configure 
   检查环境,生成makefile文件
  报错,缺少一些库函数,直接yum安装或者 --without  暂时不安装

配置汇总
Configuration summary
  + using PCRE library: auto/lib/pcre/
  + OpenSSL library is not used
  + using builtin md5 code
  + sha1 library is not found
  + using system zlib library
 
  nginx path prefix: "/usr/local/nginx"
  nginx binary file: "/usr/local/nginx/sbin/nginx"
  nginx configuration prefix: "/usr/local/nginx/conf"
  nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
  nginx pid file: "/usr/local/nginx/logs/nginx.pid"
  nginx error log file: "/usr/local/nginx/logs/error.log"
  nginx http access log file: "/usr/local/nginx/logs/access.log"
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"
 
2. 执行make 编译命令
  [root@localhost nginx-1.8.0]#make
 
根据 Makefile 中规定的内容进行编译,生成的可执行文件放在当前目录或某个子目录
 
 
3.make install
 [root@localhost nginx-1.8.0]#make install
将 make 生成的文件安装到系统目录中
完成后默认创建 /usr/local/nginx    文件
 
 
启动命令:
[root@localhost sbin]#/usr/local/nginx/sbin/nginx  
 
 
 
帮助及其它命令:
[root@localhost sbin]# ./nginx  -h
nginx version: nginx/1.8.0
Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p prefix] [-g directives]
 
Options:
  -?,-h         : this help                                 帮助
  -v            : show version and exit            显示版本
  -V            : show version and configure options then exit         显示版本和安装配置选项       
  -t            : test configuration and exit                              
                                  测试配置文件,一个好的方法是 新建一个配置进行测试,而不是对原文件进行修改。
                                  可以使用 nginx -t -c /test.conf   这条命令来测试新建配置文件
                                                     
  -q               : suppress non-error messages during configuration testing
  -s signal     : send signal to a master process: stop, quit, reopen, reload
                         发送信号控制守护进程
                          -s stop            立即停止(使用term信号)
                          -s quit             温和的停止(使用quit信号)
                          -s  reopen      重新打开日志文件
                          -s reload         重新载入配置文
  -p prefix     : set prefix path (default: /usr/local/nginx/)                指定根目录 路径
  -c filename   : set configuration file (default: conf/nginx.conf)    指定配置未见
  -g directives : set global directives out of configuration file     指定额外的配置(配置文件中未包含)
 
紧急情况下可以使用 kill 命令结束程序
# killall nginx

nginX 安装 启动的更多相关文章

  1. 聊聊、Nginx 安装启动

    首先说下安装 Nginx 的步骤: (1)window 下安装 进入 http://nginx.org/en/download.html 下载版本 Mainline version 或者 Stable ...

  2. ubuntu 14.04(desktop amd 64) nginx 安装启动停止

    sudo apt-get install nginx 关闭: sudo service nginx stop 启动: sudo nginx

  3. nginx安装启动

    参考:http://network.51cto.com/art/201005/198198_4.htm 下载nginx tar.gz安装包下载pcre tar.gz安装包 安装pcretar zxvf ...

  4. nginx 安装启动

    [root@localhost ~]# wget http://nginx.org/download/nginx-0.7.67.tar.gz --2010-09-24 14:48:12-- http: ...

  5. centos7 nginx安装/启动/进程状态/杀掉进程

    1.安装     下载RPM:wget http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.10.0-1.el7.ngx.x86_64.rpm ...

  6. nginx安装,启动亲测有效

    一:安装编译工具及库文件 yum -y install make zlib zlib-devel gcc-c++ libtool  openssl openssl-devel 二:安装PCRE,让 N ...

  7. Linux下Nginx安装/启动/重启/停止

    Nginx是高性能的web服务器也是非常好用反向代理服务器,可以实现负载均衡,动静分离等策略,在linux下用的非常多.下面是下载地址   http://nginx.org/en/download.h ...

  8. Nginx安装启动过程报错libpcre.so.1 cannot open shared object file: No such file or directory

    具体报错信息如下: nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: ...

  9. Linux nginx 安装 启动

    nginx下载地址:https://nginx.org/download/ ## 解压 tar -zxvf nginx-1.9.9.tar.gz ##进入nginx目录 cd nginx-1.9.9 ...

随机推荐

  1. python 装饰器-初识

    一.装饰器的形成过程 1.函数无参数,无返回值 import time def f1(): # 无参数,无返回值 time.sleep(1) print("Hello, World!&quo ...

  2. gitbub 基本使用

    一.环境 git:https://git-scm.com/ 申请github账号:https://github.com/ 二.安装git 一直next即可 三.创储存建库 1.选择New reposi ...

  3. 1.异常(Error和Exception)

    什么是异常 比如上午我们一般是开车去上班,正常情况下,一般都不会迟到,但是今天突然有个问题,车坏了或者限行了,于是乎你改坐公交了,就有可能会迟到,这就属于一种异常的情况.在实际生活中呢,可能会遇到很多 ...

  4. 图像矫正技术深入探讨(opencv)

    刚进入实验室导师就交给我一个任务,就是让我设计算法给图像进行矫正.哎呀,我不太会图像这块啊,不过还是接下来了,硬着头皮开干吧! 那什么是图像的矫正呢?举个例子就好明白了. 我的好朋友小明给我拍了这几张 ...

  5. POJ Expanding Rods

    点击打开题目 题目大意 给定L,n,C,L为红色线段,L(1+n*C)为绿色弧,求两者中点的距离 二分圆心角度数,接下来就是几何的能力了 根据正弦定理,可得: Lsinθ=rsin(90°−θ) 则弧 ...

  6. GitHub学习之路1

    对于代码的管理以及维护上,GitHub不失为一个较为明智的选择.而对于GitHub的灵活应用也是相当重要的,以下记录为以防自己忘记. 1. 创建SSH Key ssh-keygen -t rsa –C ...

  7. 个人第四次作业--Alpha项目测试

    这个作业属于哪个课程 https://edu.cnblogs.com/campus/xnsy/GeographicInformationScience 这个作业要求在哪里 https://www.cn ...

  8. (初学JS)JS基础——ATM机终端程序编写<1.0>

    初步学习了JS基础,为了更好地将所学知识熟练运用,我进行了银行ATM存取款机的模拟程序编写,主要通过VScode终端实现系列操作. 我的ATM程序包括6个主要功能:1.查询余额 2.存钱 3. 取钱 ...

  9. JS-08-对象

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  10. Day6-Python3基础-面向对象编程

    面向过程 VS 面向对象 编程范式 编程是 程序 员 用特定的语法+数据结构+算法组成的代码来告诉计算机如何执行任务的过程 , 一个程序是程序员为了得到一个任务结果而编写的一组指令的集合,正所谓条条大 ...