安装指南:
http://wiki.nginx.org/HttpLuaModule
注意事项:
- nginx 与 lua_module的兼容性
- 如果要使用ffi的话,需要使用luajit (安装指南中有说明)
我的安装:
- nginx: http://nginx.org/download/nginx-1.6.2.tar.gz (from: http://nginx.org/en/download.html )
- lua_nginx_module: https://github.com/openresty/lua-nginx-module/archive/v0.9.12.zip (from: https://github.com/openresty/lua-nginx-module/releases )
- ngx_devel_kit: https://github.com/simpl/ngx_devel_kit/archive/v0.2.19.zip ( from: https://github.com/simpl/ngx_devel_kit )
- 编译nginx时有一个的pcre依赖: http://sourceforge.net/projects/pcre/?source=typ_redirect
- 命令:
1234export LUA_LIB=/usr/local/lib/lua/5.1export LUA_INC=/usr/local/include./configure --prefix=/data1/nginx --add-module=../ngx_devel_kit-0.2.19 --add-module=../lua-nginx-module-0.9.12/ --with-pcre=/data1/software/pcre-8.36make -j2 && make install