Linux 搭建 openresty ,对 nginx 二次 开发,openrestynginx


  • 安装一些需要的依赖

yum install readline-devel pcre-devel openssl-devel gcc

  • 为了支持 http2 ,依次执行以下命令

cd /opt/
wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
tar -zxvf openssl-1.0.2-laest.tar.gz

  • 开始 openresty 部分,依次执行

wget https://openresty.org/download/openresty-1.13.6.2.tar.gz
tar -zxvf openresty-1.13.6.2.tar.gz
cd openresty-1.13.6.2
./configure --prefix=/opt/openresty --with-luajit --without-http_redis2_module --with-http_iconv_module --with-http_v2_module --with-openssl=/opt/openssl-1.0.2p
make
make install

  • 启动 nginx

/opt/openresty/nginx/sbin/nginx -c /opt/openresty/nginx/conf/nginx.conf -p /opt/openresty/nginx/

相关内容

    暂无相关文章