【Lua教程】lua安装配置

1)
LuaJIT即采用C语言写的Lua的解释器的代码。

wget http://luajit.org/download/LuaJIT-2.0.3.tar.gz
tar xf LuaJIT-2.0.3.tar.gz
cd LuaJIT-2.0.3
make && make install
ln -sv /usr/local/lib/libluajit-5.1.so.2.0.3 /lib64/libluajit-5.1.so.2

下载ngx_devel_kit并解压
2)

wget https://github.com/simpl/ngx_devel_kit/archive/v0.2.19.tar.gz
tar zxvf v0.2.19.tar.gz

下载ngx_lua并解压
3)

wget https://github.com/chaoslawful/lua-nginx-module/archive/v0.9.6.tar.gz
tar zxvf v0.9.6.tar.gz

4)
重新编译安装nginx

./configure  --with-pcre --add-module=/opt/lua-nginx-module-0.9.6 --add-module=/opt/ngx_devel_kit-0.2.19 
make && make install