下载

yum install -y make cmake gcc gcc-c++ autoconf automake \
libpng-devel libjpeg-devel libxml2-devel ncurses-devel \
libtool-ltdl-devel pcre-devel openssl-devel freetype-devel libcurl-devel readline-devel  \
libmcrypt mhash mcrypt \
zlib bison curl libevent libevent-devel
# install libiconv
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz  
tar -zxvf libiconv-1.16.tar.gz  
cd libiconv-1.16
./configure --prefix=/usr/local/libiconv  
make && make install
wget https://openresty.org/download/openresty-1.15.8.1.tar.gz

./configure --prefix=/usr/local/openresty \
--with-luajit \
--without-http_redis2_module \
--with-http_stub_status_module \
--with-http_v2_module \
--with-http_gzip_static_module \
--with-http_sub_module \
--with-openssl=/usr/local/src/openssl-1.1.1c

参考