CentOS 6.7 编译安装Nginx 1.8.0
1、配置编译环境
yum update && yum upgrade
yum groupinstall "Development Tools"
或者
yum install gcc gcc-c++ pcre* openssl* gd-devel* zlib-devel pcre-devel libpcre3 libpcre3-dev zlib1g-dev unzip git
2、下载Nginx 1.8
wget http://nginx.org/download/nginx-1.8.0.tar.gz
3、解压并进入目录
tar -zxvf nginx-1.8..tar.gz
cd nginx-1.8.
4、配置编译参数
简洁版
./configure
定制版(可根据生产要求定制需要的模块)
./configure \
--prefix=/usr/local/nginx \
--with-pcre \
--with-http_ssl_module \
--with-http_spdy_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_auth_request_module \
--with-http_stub_status_module \
--with-http_image_filter_module \
--with-http_gzip_static_module
编译成功会显示:
Configuration summary
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ 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"
5、安装
make && make install
6、启动Nginx
cd /usr/local/nginx/sbin/
./nginx
启动成功后可以使用netstat查看
netstat -tunlp | grep nginx
7、停止Nginx
/usr/local/nginx/sbin/nginx -s stop
或者
pkill nginx
8、重启Nginx
/usr/local/nginx/sbin/nginx -s reload
9、测试配置文件
/usr/local/nginx/sbin/nginx -t
10、Nginx支持信号控制
TERM, IN 快速关闭
QUIT 从容关闭
HUP 重载配置
USR1 重新打开日志文件
USR2 平滑升级可执行程序
WINCH 从容关闭工作进程
例如,快速关闭Nginx
kill -TERM (nginx PID)
CentOS 6.7 编译安装Nginx 1.8.0的更多相关文章
- centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14
centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14--------------------------------------------------- ...
- Ubuntu 16.04源码编译安装nginx 1.10.0
一.下载相关的依赖库 pcre 下载地址 http://120.52.73.43/jaist.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.t ...
- Centos 6.5编译安装Nginx+php+Mysql
说明: 操作系统:CentOS 6.5 64位 准备篇: 一.配置好IP.DNS .网关,确保使用远程连接工具能够连接服务器 二.配置防火墙,开启80端口.3306端口 vi /etc/sysconf ...
- centos 6.3 编译安装 nginx +mysql + php
这篇文章是对另一篇文章的整理,作为记录收藏 1,配置防火墙,开启80端口.3306端口 配置iptables,开启80端口.3306端口 vi /etc/sysconfig/iptables -A I ...
- centos 6 下编译安装 nginx
下载nginx源码包,可以到nginx官方的下载文件归档里 http://nginx.org/download/ 下载 下载pcre源码,并编译安装,从pcre官方下载 ftp://ftp.csx. ...
- 在CentOS 7下编译安装Nginx+PHP+MySQL环境
本文转载自:http://www.softeng.cn/?p=156,本文已获得作者授权,未经作者同意,不可转载. 1.前言 本文适合于已经对Linux操作系统具有基本操作经验,并且能够在Linux或 ...
- Centos 6.3 编译安装Nginx+php+Mysql
1.配置防火墙,开启80端口.3306端口 vi /etc/sysconfig/iptables 将 -A INPUT -m state --state NEW -m tcp -p tcp --dpo ...
- centos源码编译安装nginx过程记录
前言:Centos系统编译安装LNMP环境是每来一台新服务器或换电脑都需要做的事情.这里仅做一个记录.给初学者一个参考! 一.安装前的环境 这里用的是centos 7系统. 我们默认把下载的软件放在 ...
- centos 6.6编译安装nginx
nginx 安装 安装前必要软件准备 1)安装pcre.gzip 等为了支持rewrite功能,我们需要安装pcre # yum install -y pcre* zlib zlib-devel op ...
随机推荐
- MySQL创建用户、授权等
用于MySQL5.6命令行执行成功: create database wp_people; create user wp_people@'localhost' identified by 'yrwb' ...
- 我的iphone6退货之路
开篇 匆匆这一年又快结束了,眼看年关将近,老婆的生日也快到了,正打算给老婆买个礼物,由于现在老婆用的手机是公司的工程机,而且还是低端产品,所以一直想给老婆改善改善,也算是对老婆这一年来辛苦的默默的支持 ...
- Microsoft HoloLens 技术解谜(下)
读者提问之“HoloLens 的深度传感器有没有可能是基于 TOF?” 先介绍下背景知识,市面上常见的有三种类型的深度传感器: 结构光,这个技术的代表产品是 Kinect 一代,它的传感器芯片用的是 ...
- Fail2ban用来作DDOS防守工具,不知够不够份量
http://www.serversyntax.com/2012/12/how-to-secure-centos-server-ssh-fail2ban-ddos-deflate.html http: ...
- Mysql 8个小时连接断开问题解析
wait_timeout — 指的是mysql在关闭一个非交互的连接之前所要等待的秒数,其取值范围为1-2147483(Windows),1-31536000(linux),默认值28800. int ...
- random随机函数
SQL> select * from (select ename,job from emp order by dbms_random.value() ) where rownum <5 2 ...
- 【转】在VMware中安装OS X Yosemite
原文网址:http://blog.gaohaobo.com/229.html OS X(前称:Mac OS X)操作系统是由苹果公司(Apple Inc.)为其Mac系列产品开发的.基于Unix的专属 ...
- codeforce --- 340D
D. Bubble Sort Graph time limit per test 1 second memory limit per test 256 megabytes input standard ...
- [Exchange2013] 无法正常发送存入草稿箱 或者 只能发不能收
可能是由于你的域控的DNS设置导致: 1.那么首先我们添加一个EX的记录在域控的DNS里面 2.登录exchange的控制台,设置DNS Server
- mysql 学习(1)
1.从图中看到mysql是客户服务器模式. 2.我们如何操纵数据库? a.直接sql,各种编程语言, 3.客户端和服务器如何通信呢? 凡是c/s模式的都会自己的协议,但是都是基于TCP/IP协议,在l ...