[Openresty] install nginx_lua

Source: Internet
Author: User
: This article describes how to install nginx_lua in [openresty]. if you are interested in the PHP Tutorial, refer to it.

This method is to directly install openresty, instead of re-compiling nginx

Ubuntu installation

Install dependency packages

$ sudo apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make

Soft connection

$ sudo ln -s  /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/lib/liblua.so

Download the installation package

$ http --download http://openresty.org/download/ngx_openresty-1.7.10.1.tar.gz$tar -zxvf ...

Compile and install

$ ./configure --prefix=/usr/local/openresty  --with-pcre-jit--with-ipv6--without-http_redis2_module--with-http_iconv_module-j2$ sudo make$ sudo make install

After the installation is complete
/Usr/local/openresty/nginx/conf/nginx. conf write nginx lua program

Installation on centos

# yum install readline-devel pcre-devel openssl-devel# wget http://openresty.org/download/ngx_openresty-1.7.10.1.tar.gz# tar zxvf ngx_openresty-1.7.10.1.tar.gz# cd ngx_openresty-1.7.10.1# ./configure --with-luajit# gmake# gmake install 

Intermediate error

/root/softwares/ngx_openresty-1.7.10.1/build/nginx-1.7.10/../ngx_lua-0.9.15/src/ngx_http_lua_regex.c:1948: undefined reference to `pcre_free_study'objs/addon/src/ngx_http_lua_regex.o: In function `ngx_http_lua_ffi_destroy_regex':/root/softwares/ngx_openresty-1.7.10.1/build/nginx-1.7.10/../ngx_lua-0.9.15/src/ngx_http_lua_regex.c:2335: undefined reference to `pcre_free_study'

Reference: http://www.cnblogs.com/shuaixf/archive/2012/11/16/2773357.html

Refer:
Https://github.com/openresty/lua-nginx-module#installation
You can also refer to Tao GE code
Http://jinnianshilongnian.iteye.com/blog/2190344

Statement:
This article from the "orangleliu notebook" blog, reprint please be sure to keep this source http://blog.csdn.net/orangleliu/article/details/44804991
Author orangleliu adopts signature-non-commercial use-share protocol in the same way

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.