- 从官网上下载源码压缩包
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 目录下
--w