您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

[openresty]安装nginx_lua

2024/3/16 0:54:02发布31次查看
这种方式是直接安装openresty ,不是通过重新编译nginx
ubuntu 安装
安装依赖包
$ sudo apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make
软连接
$ sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/lib/liblua.so
下载安装包
$ http --download http://openresty.org/download/ngx_openresty-1.7.10.1.tar.gz$tar -zxvf ...
编译安装
$ ./configure --prefix=/usr/local/openresty --with-pcre-jit--with-ipv6--without-http_redis2_module--with-http_iconv_module-j2$ sudo make$ sudo make install
安装完成之后就可以在
/usr/local/openresty/nginx/conf/nginx.conf 写nginx lua程序了
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
中间报错
/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'
参考:http://www.cnblogs.com/shuaixf/archive/2012/11/16/2773357.html
参考:
https://github.com/openresty/lua-nginx-module#installation
也可以参考涛哥代码
http://jinnianshilongnian.iteye.com/blog/2190344
声明:
本文出自 “orangleliu笔记本” 博客,转载请务必保留此出处http://blog.csdn.net/orangleliu/article/details/44804991
作者orangleliu 采用署名-非商业性使用-相同方式共享协议
以上就介绍了[openresty]安装nginx_lua,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product