遇到的问题
the HTTP rewrite module requires the PCRE library
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=option.
解决方案:
yum -y install pcre-devel
the HTTP gzip module requires the zlib library
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=option.
解决方案:
yum install -y zlib-devel
C compiler cc is not found
原因:
缺少 gcc-c++ 的包
解决方案:
yum -y install gcc-c++
nginx的下载及安装
1 | // 下载 |
启动nginx
进入安装目录,默认为/usr/local/nginx
./sbin/nginx
停止nginx
nginx -s stop
重启nginx
nginx -s reload