为内部一台测试机./configure编译nginx时遇到报错,记录下来
./configure \
--prefix=/usr/local/nginx \ 指定安装位置
--with-http_flv_module \ 支持对FLV(flash)文件的拖动播放
--with-http_gzip_static_module \ 添加模块 ngx_http_gzip_static_module,使nginx服务器允许发送以“.gz”作为文件扩展名的预压缩文件,以替代发送普通文件
--with-http_stub_status_module \ 取得一些nginx的运行状态
--with-cc=gcc \ 指定 C 编译器的路径
--with-cc-opt=' -O3' 设置额外的C编译器选项
先后出现了两个错误,如下:
1、error: the HTTP rewrite module requires the PCRE library.
解决办法:yum -y install pcre-devel
2、error: the HTTP gzip module requires the zlib library.
解决办法:yum install -y zlib-devel
编译成功!
推荐阅读:
Nginx实现反向代理和负载均衡的配置及优化 http://www.linuxidc.com/Linux/2013-11/92909.htm
Nginx做负载均衡报:nginx: [emerg] could not build the types_hash http://www.linuxidc.com/Linux/2013-10/92063.htm
Nginx 负载均衡模块 ngx_http_upstream_module 详述 http://www.linuxidc.com/Linux/2013-10/91907.htm
Nginx+Firebug 让浏览器告诉你负载均衡将请求分到了哪台服务器 http://www.linuxidc.com/Linux/2013-10/91824.htm
Ubuntu安装Nginx php5-fpm MySQL(LNMP环境搭建) http://www.linuxidc.com/Linux/2012-10/72458.htm
Nginx 的详细介绍:请点这里
Nginx 的下载地址:请点这里
