openresty资料之软件安装

    xiaoxiao2022-07-03  170

    从官网上下载源码压缩包 wget https://openresty.org/download/openresty-1.13.6.2.tar.gz 解压缩 tar -zxvf openresty-1.13.6.2.tar.gz 编译前的配置工作 cd openresty-1.13.6.2 ./configure

    注:报错信息及解决方案

    (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 install

    OpenResty 也会默认安装到“ /usr/local/openresty/”目录下。

    最新回复(0)