1、下载:https://openresty.org/download/openresty-1.13.6.1.tar.gz
tar -zxvf openresty-1.13.6.1.tar.gz
查看安装了解参数配置帮助文件:http://openresty.org/cn/installation.html
找到对应的系统,我本地使用centos7所以选择了
Fedora 和 RedHat 用户
安装所需扩展(官网没有给出 postgresql-devel,我在编译的时候报错: ./configure: error: ngx_postgres addon was unable to detect version of the libpq library.)yum install pcre-devel openssl-devel gcc curl postgresql-devel
./configure --prefix=/usr/local/openresty \
--with-luajit \
--without-http_redis2_module \
--with-http_iconv_module \
--with-http_postgres_module
make && make install