选择源码安装  下载安装包  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. 在ubuntu 18上安装MongoDB

    本文介绍 MongoDB Community Edition 在 Ubuntu 下的安装和常见配置方法.文中操作基于 MongoDB Community Edition 4.2.2 和 Ubuntu ...

  2. 什么是aPaas?aPaas与低代码又是如何促进应用程序开发现代化的?

    从软件即服务(SaaS)到基础设施即服务(IaaS),云计算的兴起使“一切皆服务”(XaaS)模型得以泛滥,而aPaaS可能是这些模型中最鲜为人知的模型.随着aPaaS市场预计将从2018年的近90亿 ...

  3. 求树上任意一点所能到达的最远距离 - 树上dp

    A school bought the first computer some time ago(so this computer's id is 1). During the recent year ...

  4. 递推 dp

    工大要建新教学楼了,一座很高很高的楼,它有n层.学校为了减少排电梯的队伍,建造了好多好多电梯,共有m个.为了让电梯有序,学校给每个电梯设定了独特的可停楼层,如 x1 x2 y1 y2 表示,x1楼层到 ...

  5. BeautifulSoup的简单用法

    官方文档加载比较慢(估计是我党的原因) https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html#find-parents ...

  6. Android教程2020 - RecyclerView使用入门

    本文介绍RecyclerView的使用入门.这里给出一种比较常见的使用方式. Android教程2020 - 系列总览 本文链接 想必读者朋友对列表的表现形式已经不再陌生.手机上有联系人列表,文件列表 ...

  7. SpringCloud与微服务Ⅸ --- Zuul路由网关

    一.Zool是什么 Zuul包含了对请求路由和过滤两个最主要的功能: 其中路由功能负责将外部请求转发到具体的微服务实例上,是实现外部访问统一入口的基础而过滤器功能则负责对请求的处理过程进行干预,是实现 ...

  8. 使用AOP和Semaphore对项目中具体的某一个接口进行限流

    整体思路: 一 具体接口,可以自定义一个注解,配置限流量,然后对需要限流的方法加上注解即可! 二 容器初始化的时候扫描所有所有controller,并找出需要限流的接口方法,获取对应的限流量 三 使用 ...

  9. Iptables和Firewall-selinux

    一.Iptables防火墙 ---------- **三表五链:**三表: filter过滤表 nat转换表 mangle表五链: PREROUTING--->在进行路由选择前处理数据包 INP ...

  10. ajax 后台java代码执行完毕 前端报404错误

    一个ajax请求,到java后台代码,后台成功接受并执行相应处理,但是返回的时候,success却没进去,前端报404错误. 因为是由于Controller忘记写spring的@Responsebod ...