Reference: http://my.oschina.net/eduosi/blog/169606
yum
install
readline
yum
install
readline-devel
wget http://www.lua.org/ftp/lua-5.3.0.tar.gz
Tar XF lua-5.3.0.tar.gz
CD lua-5.3.0/
make
linux
make
install
Cd.. wget Http://luajit.org/download/LuaJIT-2.0.3.tar.gztar XF LUAJIT-2.0.3.TAR.GZCD luajit-2.0.3/
make
make
install
Ln-s/usr/local/lib/libluajit-5.1.so.2/lib64/libluajit-5.1.so.2export Luajit_lib=/usr/local/lib
Export LUAJIT_INC=/USR/LOCAL/INCLUDE/LUAJIT-2.0/  CD. CD tengine-2.1.0 ./configure--prefix=/usr/local/tengine-2.1.0--dso-path=/usr/local/tengine-2.1.0/modules-- With-http_realip_module--with-http_gzip_static_module--with-http_stub_status_module--with-http_concat_module-- with-http_lua_module --http-proxy-temp-path=/var/tmp/tengine-2.1.0/proxy_temp--http-fastcgi-temp-path=/ Var/tmp/tengine-2.1.0/fastcgi_temp--http-uwsgi-temp-path=/var/tmp/tengine-2.1.0/uwsgi_temp-- Http-scgi-temp-path=/var/tmp/tengine-2.1.0/cgi_temp--http-client-body-temp-path=/var/tmp/tengine-2.1.0/client_ Body_temp--http-log-path=/var/log/tengine-2.1.0/access.log--error-log-path=/var/log/tengine-2.1.0/error.log-- With-ld-opt= "-wl,-rpath, $LUAJIT _lib" make && make Install useradd www ln-s/usr/local/ Tengine-2.1.0/usr/local/nginxmkdir/var/tmp/tengine-2.1.0/client_body_temp-pchown-r www/var/tmp/tengine-2.1.0
Test
location/lua_content {
# MIME type determined by Default_type:
Default_type ' Text/plain ';
Content_by_lua "Ngx.say (' hello,world! ')";
}
Base64
wget http://luaforge.net/frs/download.php/2664/luasocket-2.0.2.tar.gz
tengine-2.1.0 + Lua + base64