Nginx+lua+mysql实时存日志
准备材料
安装
LuaJIT 安装
tar zxf LuaJIT-2.0.5.tar.gz cd LuaJIT-2.0.5 make make install PREFIX=/home/myself/lj2
pcre 安装
tar -zxvf pcre-8.32.tar.gz cd pcre-8.32 make make install
Nginx 安装
export LUAJIT_LIB=/path/to/luajit/lib export LUAJIT_INC=/path/to/luajit/include/luajit-2.1 ./configure --prefix=/opt/nginx \ --with-ld-opt="-Wl,-rpath,/path/to/luajit-or-lua/lib" \ --add-module=/path/to/ngx_devel_kit \ --add-module=/path/to/lua-nginx-module make make install
配置文件
user root;
worker_processes 2;
events {
worker_connections 1024;
}
http{
lua_package_path