下载相关安装包
#wget http://luajit.org/download/LuaJIT-2.0.4.tar.gz
#wget https://github.com/simpl/ngx_devel_kit/archive/v0.3.0.tar.gz
#wget https://github.com/openresty/lua-nginx-module/archive/v0.10.13.tar.gz
安装LuaJIT
#tar xf LuaJIT-2.0.4.tar.gz
#cd xf LuaJIT-2.0.4
#make PREFIX=/usr/local/luajit
#make install PREFIX=/usr/local/luajit
#ln -s /usr/local/luajit/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2
添加环境变量
export LUAJIT_LIB=/usr/local/luajit/lib
export LUAJIT_INC=/usr/local/luajit/include/luajit-2.0
#source /etc/profile
安装nginx
#tar xf v0.3.0.tar.gz
#tar xf v0.10.13.tar.gz
#tar xf nginx-1.12.0.tar.gz
#cd nginx-1.12.0
#./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-http_geoip_module --with-http_realip_module --add-module=../lua-nginx-module-0.10.13 --add-module=../ngx_devel_kit-0.3.0 --with-stream --with-stream_ssl_module
#make
#make install
安装完成