nginx lua模塊安裝
阿新 • • 發佈:2018-12-06
環境 redhat 6 下載 dev org htm figure configure pan
1、安裝LuaJIT,LuaJIT為LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language
wget http://luajit.org/download/LuaJIT-2.0.5.tar.gz tar -zxvf LuaJIT-2.0.5.gz && cd LuaJIT-2.0.5 make && make install PREFIX=/usr/local/luajit
#導入兩個環境變量
export LUAJIT_LIB=/usr/local/luajit/lib
export LUAJIT_INC=/usr/local/luajit/include/luajit-2.0
2、下載ngx_devel_kit、和lua-nginx-module
wget https://github.com/simplresty/ngx_devel_kit/archive/v0.3.1rc1.tar.gz tar -xzvf ngx_devel_kit-0.3.1rc1.tar.gz wget https://github.com/openresty/lua-nginx-module/archive/v0.10.14rc3.tar.gz tar -xzvf v0.10.14rc3.tar.gz
按前一篇文章的步驟重新編譯nginx即可,RedHat 6.6下安裝nginx,配置HTTPS,註意在configure時候新增參數
--add-module=/root/ngx_devel_kit-0.3.1rc1 --add-module=/opt/soft/lua-nginx-module-0.10.8
nginx lua模塊安裝