# 下载 ```bash 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 ``` ```bash 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 ``` # 参考 * https://openresty.org/ * https://github.com/openresty/openresty * 使用 lua-redis 实现封禁ip高频访问 * openrestry 后端服务upstream 健康检查配置 * 基于OpenRestry部署nginx+lua实现流量定向分发