下载源码包
wget https://openresty.org/download/openresty-1.15.8.2.tar.gz
安装依赖libpq、pcre、openssl
yum -y install postgresql-devel pcre-devel openssl openssl-devel gcc
yum install postgresql-devel
yum -y install pcre-devel
yum -y installopenssl-devel
配置
./configure --prefix=/usr/local/openresty \
--with-luajit \
--without-http_redis2_module \
--with-http_iconv_module \
--with-http_postgres_module
安装
gmake
gmake install
运行
export PATH=$PATH:/usr/local/openresty/nginx/sbin
nginx -c /usr/local/openresty/nginx/conf/nginx.conf
参考
官方文档