Ubuntu14.04:

卸载原有通过apt安装的nginx:

apt remove nginx nginx-commonapt purge nginx nginx-commonapt remove nginx-full nginx-common

安装需要的依赖:

apt install zlib1g-devapt install  libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make build-essential

获取源码进行编译安装:

wget https://openresty.org/download/openresty-1.13.6.2.tar.gztar zxvf openresty-1.13.6.2.tar.gzcd openresty-1.13.6.2./configure --with-luajit --with-http_ssl_module --with-http_realip_modulemake -j 8make install

坑点:

1、ubuntu下zlib支持包交zlib1g-dev2、openresty-1.13.6.2之前的版本编译出现storage size of ‘ctx’ isn’t known,问题是openssl的版本问题。openresty-1.13.6.2已经修复了这个问题,不需要修改openssl的版本。
收藏 打印