This article mainly introduces the Nginx installation of the LUA module, has a certain reference value, now share to everyone, the need for friends can refer to
Nginx Compiler installs LUA module
First, install the LUA environment and related libraries
1, Luajit
wget http://luajit.org/download/LuaJIT-2.0.2.tar.gztar-zxvf luajit-2.0.2.tar.gzcd luajit-2.0.2make Install prefix=/ Usr/local/luajitexport Luajit_lib=/usr/local/luajit/libexport luajit_inc=/usr/local/luajit/include/luajit-2.0
2, Ngx_devel_kit and Lua-nginx-module
Cd/opt/downloadwget Https://github.com/simpl/ngx_devel_kit/archive/v0.3.0.tar.gzwget https://github.com/ openresty/lua-nginx-module/archive/v0.10.9rc7.tar.gz# respectively Decompression
3. Re-compile Nginx
Cd/opt/downloadwget HTTP://NGINX.ORG/DOWNLOAD/NGINX-1.14.0.TAR.GZTAR-ZXVF NGINX-1.14.0.TAR.GZCD nginx-1.14.0./ Configure--add-module=/opt/download/ngx_devel_kit-0.3.0--add-module=/opt/download/lua-nginx-module-0.10.9rc7# In the event of: # error:the HTTP gzip module requires the zlib library.# yum install zlib zlib-devel then make-j 4 && make I Nstall
4. Load Lua Library and add to ld.so.conf file
echo "/usr/local/luajit/lib" >>/etc/ld.so.conf# then execute the following command: Ldconfig
Related recommendations:
Nginx compiler installation and configuration