选择源码安装  下载安装包  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. React16源码解读:开篇带你搞懂几个面试考点

    引言 如今,主流的前端框架React,Vue和Angular在前端领域已成三足鼎立之势,基于前端技术栈的发展现状,大大小小的公司或多或少也会使用其中某一项或者多项技术栈,那么掌握并熟练使用其中至少一种 ...

  2. angularjs路由菜单强制刷新

    在开发过程中遇到使用路由控制单页加载页面时,点击菜单页面不重新刷新的情况,angularjs认为路由没有变化,而不会去刷新页面,解决办法: angular.module('myApp').direct ...

  3. IDEA新建maven项目没有webapp目录解决方法

    转载地址:https://www.cnblogs.com/oldzhang1222/p/10429827.html 先创建的页面修改路径 修改路径如下 添加并完善路径\src\main\webapp ...

  4. (分块暴力)Time to Raid Cowavans CodeForces - 103D

    题意 给你一段长度为n(1 ≤ n ≤ 3·1e5)的序列,m (1 ≤ p ≤ 3·1e5)个询问,每次询问a,a+b,a+2b+...<=n的和 思路 一开始一直想也想不到怎么分,去维护哪些 ...

  5. SycSec成都信息工程大学2019CTF-前五道WEB题writeup

    一.WEB (1)一起来撸猫 flag藏在标签的注释内  <!--这是注释--> (2)你看见过我的菜刀么 eval漏洞 利用蚁剑连接 连接密码就是要post传的参数 连接成功后在网站根目 ...

  6. dotnet restore 初次运行 这个 指令 会安装 特别多的 4.0.0 或者 4.1 的 rc2-24027的 东东 这些东西。

  7. 将一条路由约束到一组指定的值 约束路由 URL路由

  8. 对于Makefile的基本使用

    上课不听讲的后果就是课下疯狂补知识了 原文来自https://www.cnblogs.com/chenguanfu/p/4415072.html 在Windows下,只需要简单的点击以下make,re ...

  9. Chrome浏览器所有页面全部崩溃解决办法。

    今晚写代码的时候更新了一下Chrome,结果打开所有网页都提示 喔唷 崩溃了,而且找到c盘内没有bd0001.sys文件,电脑内也无任何百度系的软件,此解决办法pass. 折腾了半天从google中找 ...

  10. 使用Rclone和WinFsp挂载FTP为磁盘

    介绍 Rclone:是一款的命令行工具,支持在不同对象存储.网盘间同步.上传.下载数据.官网网址:rclone.org WinFsp:是一款Windows平台下的文件系统代理软件(Windows Fi ...