选择源码安装  下载安装包  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. java学生管理系统(增、删、改、查功能)

    package mm; import java.util.Scanner;import java.util.ArrayList; class Student1 { private String stu ...

  2. 20191102Java课堂记录

    1. import javax.swing.*; class AboutException { public static void main(String[] a) { int i=1, j=0, ...

  3. 【Java并发基础】加锁机制解决原子性问题

    前言 原子性指一个或多个操作在CPU执行的过程不被中断的特性.前面提到原子性问题产生的源头是线程切换,而线程切换依赖于CPU中断.于是得出,禁用CPU中断就可以禁止线程切换从而解决原子性问题.但是这种 ...

  4. 出现An App ID with Identifier 'com.XXX.XXX’ is not available. Please enter a different string.

    解决方法: 1.移除钥匙串中的开发证书,重新导入, 完全关闭Xcode; 2.再次打开Xcode,通过 Preferences - View Details - download 新的证书: 3.选择 ...

  5. Java入门 - 高级教程 - 06.邮件收发

    原文地址:http://www.work100.net/training/java-email.html 更多教程:光束云 - 免费课程 邮件收发 序号 文内章节 视频 1 概述 2 发送一封简单的邮 ...

  6. 资源| 学习视频库-永久有效,持续更新!附赠java面试汇总

    每天进步一丢丢,连接梦与想 我们总是羡慕他人的光芒,却忘记自己也会发光 声明 资源来自于网络,小编只是资源的搬运工,若有侵权,联系小编即删. 期待已久的学习视频库来啦! 经过小编多日整理,整理了1.5 ...

  7. set集合迭代

    1.迭代遍历 Set<String> set = new HashSet<String>(); Iterator<String> it = set.iterator ...

  8. ValidationAttribute特性的截图

  9. C++封装的基于WinSock2的TCP服务端、客户端

    无聊研究Winsock套接字编程,用原生的C语言接口写出来的代码看着难受,于是自己简单用C++封装一下,把思路过程理清,方便自己后续翻看和新手学习. 只写好了TCP通信服务端,有空把客户端流程也封装一 ...

  10. JS中for...in循环陷阱及遍历数组的方式对比

    JavaScript中有很多遍历数组的方式,比较常见的是for(var i=0;i<arr.length;i++){},以及for...in...循环等,这些遍历都有各自的优缺点,下面来看看各种 ...