Installing luajit2.0.2
wget http://luajit.org/download/LuaJIT-2.0.0-beta9.tar.gz
Tar zxvf luajit-2.0.0-beta9.tar.gz
CD LUAJIT-2.0.0-BETA9
Make
sudo make install Prefix=/usr/local/luajit
Install Ngx-devel-kit, Lua-nginx-module, Echo-nginx-module
cd/usr/local/
git clone https://github.com/simpl/ngx_devel_kit
git clone https://github.com/agentzh/echo-nginx-module
git clone https://github.com/chaoslawful/lua-nginx-module
Luajit Environment variables
Export Luajit_lib=/usr/local/luajit/lib
Export luajit_inc=/usr/local/luajit/include/luajit-2.0
Installing Nginx
wget nginx.org/download/nginx-1.6.3.tar.gz
Tar zxvf nginx-1.6.3.tar.gz
CD nginx-1.6.3./configure--prefix=/usr/local/nginx--with-ld-opt= "-wl,-rpath, $LUAJITLIB"--add-module=/usr/ Local/ngxDevel_kit--add-module=/usr/local/echo-nginx-module--add-module=/usr/local/lua-nginx-module
Make-j2
Make install
Verify/usr/local/nginx-v
Installing Redis-lua
git clone Https://github.com/nrk/redis-lua
CP Redis-lua/src/redis.lua/usr/local/share/lua/5.1/redis.lua
Installing lua-socket2.0.2
wget http://luaforge.net/frs/download.php/2664/luasocket-2.0.2.tar.gz
Tar zxvf luasocket-2.0.2.tar.gz
CD luasocket-2.0.2
Vim Config
luainc=-i/usr/local/luajit/libluainc=-i/usr/local/luajit/include/luajit-2.0
Make
Make install
Redis Yum Install Redis
The above describes the Nginx+lua+redis installation, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.