天天看點

OpenResty快速部署記錄

Ubuntu14.04:

解除安裝原有通過apt安裝的nginx:

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

安裝需要的依賴:

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

擷取源碼進行編譯安裝:

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 --with-luajit --with-http_ssl_module --with-http_realip_module
make -j 8
make install
           

坑點:

1、ubuntu下zlib支援包交zlib1g-dev
2、openresty-1.13.6.2之前的版本編譯出現storage size of ‘ctx’ isn’t known,問題是openssl的版本問題。openresty-1.13.6.2已經修複了這個問題,不需要修改openssl的版本。
           

繼續閱讀