cd nginx-1.12.2/
./configure --prefix=/application/nginx
1.2.6 解决错误
错误缺少pcre库:./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
解决方案:安装pcre库
yum install pcre
yum install pcre-devel
错误缺少zlib库:./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.
解决方案:安装gzip库
yum install zlib
yum install zlib-devel
缺少c编译器:checking for OS
+ Linux 3.10.0-514.el7.x86_64 x86_64
checking for C compiler ... not found
./configure: error: C compiler cc is not found
解决方案:
yum -y install gcc
yum -y install gcc-c++