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
獲取源碼進(jìn)行編譯安裝:
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
坑點(diǎn):
1、ubuntu下zlib支持包交zlib1g-dev
2判帮、openresty-1.13.6.2之前的版本編譯出現(xiàn)storage size of ‘ctx’ isn’t known,問題是openssl的版本問題。openresty-1.13.6.2已經(jīng)修復(fù)了這個(gè)問題她紫,不需要修改openssl的版本沉御。