1. 程式人生 > >luajit+nginx+上傳模組+lua模組編譯安裝

luajit+nginx+上傳模組+lua模組編譯安裝

git clone https://github.com/fdintino/nginx-upload-module.git

git clone https://github.com/openresty/lua-nginx-module.git

git clone https://github.com/simplresty/ngx_devel_kit.git

檢視載入哪些模組:
~/local/nginx/sbin/nginx -V

安裝luajit:
make PREFIX=/home/work/local/luajit
make install PREFIX=/home/work/local/luajit

設定luajit系統變數:
export LUAJIT_LIB=/home/work/local/luajit/lib
export LUAJIT_INC=/home/work/local/luajit/include/luajit-2.1

配置nginx:
./configure --prefix=/home/work/local/nginx_upload --with-ipv6 --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_perl_module --with-mail --with-mail_ssl_module  --add-module=../lua-nginx-module --add-module=../nginx-upload-module --add-module=../ngx_devel_kit --with-ld-opt=-Wl,-rpath,/home/work/local/luajit/lib


make -j2
make install