注:报错信息及解决方案
(1)报错一:
/usr/bin/env: perl: 没有那个文件或目录解决方案:
需要安装Perl
(2)报错二:
./configure: error: SSL modules require the OpenSSL library. You can either do not enable the modules, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using --with-openssl=<path> option.解决方案:
yum -y install openssl openssl-devel使用参数“–help ”可以列出configure 的详细说明
--prefix= /opt/openresty #指定安装到/opt/openresty 目录下 --with-http_v2_module #支持HTTP2 --with-http_realip_module #反向代理时可转发客户端真实IP 地址 --without_http_fastcgi_module #不使用fastcgi --without-http_scgi_module #不使用scgi --with-openssl=”path/to/openssl-1.0.2k" #使用OpenSSL 1.0.2k 编译安装 make make installOpenResty 也会默认安装到“ /usr/local/openresty/”目录下。