下載源碼包
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
配置
./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