This approach is to install openresty directly, not by recompiling the Nginx
Ubuntu Installation
Install dependent packages
$ sudo apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make
Soft connection
-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...
Compiling the installation
.--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, you can
/usr/local/openresty/nginx/conf/nginx.conf wrote the 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_`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
Reference:
Https://github.com/openresty/lua-nginx-module#installation
You can also refer to the Gothic code
http://jinnianshilongnian.iteye.com/blog/2190344
Statement:
This article is from the "Orangleliu Notebook" blog, reproduced please be sure to keep this source http://blog.csdn.net/orangleliu/article/details/44804991
Author Orangleliu using Attribution-NonCommercial-sharing protocol in the same way
[Openresty] Installation Nginx_lua