安装依赖
apt-get -y install libpcre3-dev libssl-dev perl libperl-dev make build-essential curl
下载安装包
wget https://openresty.org/download/openresty-1.19.9.1.tar.gz
tar xf openresty-1.19.9.1.tar.gz
cd openresty-1.19.9.1
./configure --prefix=/usr/local/openresty-1.19.9.1 --with-http_iconv_module --with-file-aio --with-poll_module --with-threads --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_stub_status_module --with-http_perl_module --with-stream_geoip_module --with-stream_realip_module --with-pcre --with-pcre-jit
make -j 4 && make install
openresty.service
[Unit] Description=openresty After=network.target
[Service]
Type=forking
ExecStart=/usr/local/openresty/bin/openresty -c /usr/local/openresty/nginx/conf/nginx.conf
ExecReload=/usr/local/openresty/bin/openresty -s reload
ExecStop=/usr/local/openresty/bin/openresty -s quit
PrivateTmp=true
[Install]
WantedBy=multi-user.target