首先安装pcre依赖
(1)下载 PCRE 安装包
wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
(2)解压安装包
tar zxvf pcre-8.35.tar.gz
(3)进入安装包目录
cd pcre-8.35
(4)从源代码构建nginx,不添加其他模块
./configure
(5)编译
make
(6)安装
make install
(7)查看pcre版本
pcre-config --version
安装nginx
(1)下载 Nginx
wget http://nginx.org/download/nginx-1.6.2.tar.gz
(2)解压安装包
tar zxvf nginx-1.6.2.tar.gz
(3)进入安装包目录
cd nginx-1.6.2
(4)从源代码构建nginx
./configure
--prefix=/usr/users/portnet/hgmeap/nginx/nginx
--sbin-path=/usr/users/portnet/hgmeap/nginx/nginx/sbin/nginx
--without-http_rewrite_module
--add-module=../nginx-other-module/lua-nginx-module-0.10.13
--with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.35
--with-http_stub_status_module
【
nginx安装路径
--prefix=path
nginx可执行文件名称
--sbin-path=path
把http_ssl_module添加到构建中
--with-http_ssl_module
启用外部模块
--add-module=path
】
(5)编译
make
(6)安装
make install