Nginx1.8源码包编译安装

Posted 兜风

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Nginx1.8源码包编译安装相关的知识,希望对你有一定的参考价值。

1、下载解压nginx,为方便管理下载包一般将下载包放在指定目录下
,即/usr/local/src/下。
wget http://nginx.org/download/nginx-1.8.0.tar.gz
tar zxvf nginx-1.8.0.tar.gz
2、配置编译参数
先进入解压的目录下
创建安装目录/usr/local/nginx
编译参数如下:
./configure \
--prefix=/usr/local/nginx \
--with-http_realip_module \
--with-http_sub_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-pcre
出错:error: the HTTP rewrite module requires the PCRE
library.
缺少做正则的包文件:yum install -y pcre-devel
error:SSL modules require the OpenSSL library.
缺少基础依赖包:yum install -y openssl openssl-devel
openssl openssl-devel在使用HTTPS服务时要用到此模块。
3、编译nginx :make
4、安装 make install
5、查看服务是否开启:ps aux |grep nginx
查看端口是否启用:netstat -ltnp


























以上是关于Nginx1.8源码包编译安装的主要内容,如果未能解决你的问题,请参考以下文章

Nginx 源码编译安装

基于CentOS6.5环境之下的LNMP之编译安装Nginx1.8.0 stable(稳定版)

centos编译安装php5.6.20+nginx1.8.1+mysql5.6.17

CentOS7编译安装nginx1.8.1

CentOS 7.1编译安装Nginx1.8.1+MySQL5.6.19+PHP5.5.14

nginx1.8.0安装