为内部一台测试机./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
编译成功!