1 wget https://openresty.org/download/openresty-1.13.6.1.tar.gz
https://openresty.org/download/openresty-1.15.8.1.tar.gz(當前最新版)
2 tar -xzvf openresty-1.13.6.1.tar.gz
3 cd openresty-1.13.6.1
4 ./configure --prefix=/opt/openresty --sbin-path=/opt/openresty/nginx/sbin/nginx --conf-path=/opt/openresty/nginx/conf/nginx.conf --error-log-path=/data/nginxLogs/error.log --http-log-path=/data/nginxLogs/access.log --pid-path=/opt/openresty/nginx/run/nginx.pid --lock-path=/opt/openresty/nginx/run/nginx.lock --http-client-body-temp-path=/opt/openresty/nginx/cache/client_temp --http-proxy-temp-path=/opt/openresty/nginx/cache/proxy_temp --http-fastcgi-temp-path=/opt/openresty/nginx/cache/fastcgi_temp --http-uwsgi-temp-path=/opt/openresty/nginx/cache/uwsgi_temp --http-scgi-temp-path=/opt/openresty/nginx/cache/scgi_temp --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --without-http_redis2_module --with-http_iconv_module --with-http_stub_status_module
5 make && make install
可能需要提前安裝,具體要看自己的機器環境
yum -y install gcc
yum -y install openssl-devel
ln -s /opt/openresty/nginx/sbin/nginx /usr/sbin/
mkdir -p /opt/openresty/nginx/cache/client_temp