1、安装依赖
yum install -y gcc glibc gcc-c++ pcre-devel openssl-devel postgresql-devel gd-devel
2、解压
tar zxf openresty-1.13.6.2.tar.gz
cd openresty-1.13.6.2
3、编译安装
./configure --help
./configure --prefix=/data/openresty/ --user=work --group=work --with-luajit --without-http_redis2_module --with-http_iconv_module --with-http_postgres_module --with-http_stub_status_module --with-http_ssl_module --with-pcre --with-http_realip_module --with-http_image_filter_module --with-http_gzip_static_module
gmake && gmake install
4、使普通用户也能启动80、443端口
cd /data/openresty/nginx/sbin
chown root:work nginx
chmod +s nginx