首先从官网下载安装包(源码),解压到一个目录下。 进入存放的目录下执行
./configure
可能会出现以下错误提示,没有编译模块
checking for OS
+ Linux 3.10.0-123.el7.x86_64 x86_64
checking for C compiler ... not found
./configure: error: C compiler cc is not found
执行命令安装编译模块
yum -y install gcc gcc-c++ autoconf automake make
安装完成会提示complete! 再次执行./configure,可能会出现以下提示
./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.
执行命令
yum -y install pcre-devel
可能会出下以下提示
./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
执行命令
yum -y install zlib-devel
本文由 biezhi 创作,采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
最后编辑时间为:
2017/09/16 09:53