Nginx Compiler installs LUA module

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.