选择源码安装  下载安装包  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爬虫——urllib使用代理

    收到粉丝私信说urllib库的教程还没写,好吧,urllib是python自带的库,没requests用着方便.本来嘛,python之禅(import this自己看)就说过,精简,效率,方便也是大家 ...

  2. Vue 组件复用性和slot

    1.组件可复用 2.slot元素作为组件模板之中的内容分发插槽,元素自身可以被替换 <!DOCTYPE html> <html lang="en"> < ...

  3. cocos2dx,Layer锚点与scale缩放

    最近写代码需要用到缩放,而且是Layer的,但是发现怎么设置位置都是错误,于是决定研究下. 首先,基础代码,代码上不错特殊处理,没有锚点设置和缩放 class TestLayer : public L ...

  4. intellij idea svn 切换分支

    原文地址:https://blog.csdn.net/wangjun5159/article/details/75137964 切换分支 更新/切换svn的快捷键是ctrl+T,这个快捷键还是很好用的 ...

  5. 关于Xen

    尝试了各种方法搭建xen,尝试过从xenserver入手,但似乎最近时间端不允许访问,感谢我的老师,叫我从kvm入手,暂时记下xen中种种的坑,以后有缘再战.欢迎交流

  6. Centos7安装 Anaconda + jupyter notebook

    一.安装Anaconda 1 下载Anaconda安装脚本 为了避免漫长的等待,镜像源选择国内的清华镜像源,镜像源地址:https://mirrors.tuna.tsinghua.edu.cn/ana ...

  7. day03_流程控制语句

    day03_流程控制语句 建议: ​ 凡是次数确定的场景多用for循环,否则用while循环. 三元运算符 ​ 由?:符号表示的,具体的含义其实就和if-else结构的含义差不多,这种运算符会将某个条 ...

  8. Windows系统以及谷歌浏览器快捷键,控制台常用命令

    win10系统 快捷键 win+D 回到桌面 控制台代码(win+R打开控制台) calc 系统计算器 谷歌浏览器快捷键 ctrl+tab 切换标签页 ctrl+ 1/2...9 数字 切换到第几个标 ...

  9. mybatis入门案例自定义实现

    mybatis入门案例自定义实现 一.需要实现的类和接口 public static void main(String[] args) throws Exception{ //1.读取配置文件 Inp ...

  10. JVM 面试题汇总

    JVM 面试题汇总 1.什么是 JVM?它有什么作用? 答:JVM 是 Java Virtual Machine(Java 虚拟机)的缩写,顾名思义它是一个虚拟计算机,也是 Java 程序能够实现跨平 ...