1、下载 wget https://openresty.org/download/openresty-1.13.6.2.tar.gz
2、解压 tar -xzf openresty-1.13.6.2.tar.gz
3、编译 ./configure (查看帮助 ./configure --help 默认安装在 /usr/local/openresty)
如果编译失败:
错误提示:/configure: error: the HTTP rewrite module requires the PCRE library.
安装pcre-devel解决问题
yum -y install pcre-devel
错误提示:./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library. You can either disable the module by using
--without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
--with-http_ssl_module --with-openssl=<path> options.
解决办法:
yum -y install openssl openssl-devel
4、编译 make
5、安装 make install