1,install lua
wget http://www.lua.org/ftp/lua-5.1.4.tar.gz
tar -zxf lua-5.1.4.tar.gz
cd lua-5.1.4
make linux
make install INSTALL_TOP=/usr/local/lua-5.1.4/
vi /etc/profile
export LUA_LIB=/usr/local/lua-5.1.4/lib
export LUA_INC=/usr/local/lua-5.1.4/include
source /etc/profile
2,install nginx with packages
http://www.nginx.org/download/nginx-0.8.55.tar.gz
https://github.com/agentzh/echo-nginx-module
https://github.com/simpl/ngx_devel_kit
https://github.com/chaoslawful/lua-nginx-module
./configure –prefix=/usr/local/nginx-0.8.55 \
–add-module=../ngx_devel_kit/ \
–add-module=../lua-nginx-module/ \
–add-module=../echo-nginx-module/
make
make install