nginx安装参数(支持lua)
使用openssl 1.1
下载luajit
git clone https://github.com/openresty/luajit2.git
然后安装
make install PREFIX=/usr/local/luajit
注意环境变量!
vi /etc/profile
在最下面添加
export LUAJIT_LIB=/usr/local/luajit/lib
export LUAJIT_INC=/usr/local/luajit/include/luajit-2.1
然后执行
source /etc/profile
在 /opt 目录下执行(随意)
cd /opt
mkdir nginx_module
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
tar -zxf openssl-1.1.1b.tar.gz
先执行
cd /opt/nginx_module
下载ngx_devel_kit
git clone https://github.com/simplresty/ngx_devel_kit.git
下载echo模块
git clone https://github.com/openresty/echo-nginx-module.git
下载tengine
git clone https://github.com/alibaba/tengine.git
最后 下载nginx 解压 编译 安装
./configure --with-http_ssl_module --with-http_v2_module --with-openssl=/opt/openssl-1.1.1b --add-module=/opt/nginx_module/tengine/modules/ngx_http_concat_module --add-module=/opt/nginx_module/ngx_devel_kit --add-module=/opt/nginx_module/tengine/modules/ngx_http_lua_module --add-module=/opt/nginx_module/echo-nginx-module --with-ld-opt="-Wl,-rpath,$LUAJIT_LIB"
网友评论