这种方式是直接安装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的更多相关文章

  1. mac下openresty安装

    //openresty安装 http://openresty.org/ brew updatebrew install pcre openssl ./configure --prefix=/usr/l ...

  2. OpenResty 安装 drizzle-nginx-module

    1.下载drizzle模块 wget http://openresty.org/download/drizzle7-2011.07.21.tar.gz 2.安装drizzle模块 tar zxvf d ...

  3. Openresty安装及使用配置(OPENRESTY+NGINX)

    Openresty 简介 Openresty是一个基于NGINX和Lua的高性能Web平台,内部有大量的Lua库和第三方模块,能够很方便的搭建处理高并发,扩展性高的Web平台和动态网关,充分利用 Ng ...

  4. Openresty 安装第三方插件

    Openresty 安装第三方插件 程序媛没有夜生活 2016.08.02 15:33* 字数 167 阅读 1283评论 0喜欢 2 在安装之前,我们先来看一下我们现有的模块. 1.将需要安装的插件 ...

  5. OpenResty 安装配置

    0. 说明 1. Windows 下安装 下载软件包 openresty-1.13.6.1-win32.zip ,解压即可食用. [开启] 直接运行 nginx.exe 在 Windows 的命令窗口 ...

  6. openresty安装文档

    一.OpenResty简介    OpenResty是一个基于 Nginx与 Lua的高性能 Web平台,其内部集成了大量精良的 Lua 库.第三方模块以及大多数的依赖项.用于方便地搭建能够处理超高并 ...

  7. CentOS7上OpenResty安装

    1,OpenResty安装 通过repl源安装: sudo yum-config-manager --add-repo https://openresty.org/yum/cn/centos/Open ...

  8. openresty安装笔记

    目录 安装步骤: openresty安装在ubuntu下的安装 参考 安装OpenResty(Nginx+Lua)开发环境 安装步骤: # 创建目录/usr/servers,以后我们把所有软件安装在此 ...

  9. OpenResty 安装及使用(第一篇安装)

    OpenResty搭建 1.openResty介绍 OpenResty (也称为 ngx_openresty)是一个全功能的 Web 应用服务器.它打包了标准的 Nginx 核心,很多的常用的第三方模 ...

随机推荐

  1. 【django小练习之主机管理界面】

    需求: 利用django,js,bootstrap等实现登录,主机管理等操作. 实现截图 登录界面 主机界面,添加及编辑 部门管理界面 代码实现 目录层级 settings.py "&quo ...

  2. 我们为什么要用springcloud?

    1 2 单体架构 在网站开发的前期,项目面临的流量相对较少,单一应用可以实现我们所需要的功能,从而减少开发.部署和维护的难度.这种用于简单的增删改查的数据访问框架(ORM)十分的重要.  垂直应用架构 ...

  3. 阿里云在RSAC 2018上宣布 将在西雅图建立安全实验室

    日前,2018年度的RSA Conference全球信息安全大会在美国加州旧金山市召开.作为全球三大云计算服务商之一,阿里云携3款全新安全产品亮相,并宣布今年将在西雅图设立全新的安全实验室,整合全球安 ...

  4. slf4j 与各个 logging框架的适配器说明

    在java领域里,日志框架纷杂繁多,项目中必然要使用很多的第三方库,而这些第三方库所使用的log框架又不尽相同.想要打出合理有效的日志,就必须在你的项目中将这些日志框架统一才行.幸好,slf4j, c ...

  5. JS点击按钮打开新的独立页面

    工作中遇到需要点击按钮弹出一个独立的页面,并显示指定内容的问题,查了一些资料后,得到以下方法: window.open('locationPage.html', '_blank', 'height=1 ...

  6. POJ 1721 CARDS

    Alice and Bob have a set of N cards labelled with numbers 1 ... N (so that no two cards have the sam ...

  7. APIO 2015

    老师让我们打这套题练练手.感觉这套题还是挺有意思的,比国内某些比赛不知道高到哪里去.最后我拿了284/300,貌似比赛是IOI赛制啊,强行被当成OI赛制做了,不然我T3可能还能多骗点. T1.scul ...

  8. Codeforces Round #452 F. Letters Removing

    Description Petya has a string of length n consisting of small and large English letters and digits. ...

  9. 【Peaks加强版 BZOJ 3551】你被坑了吗?

    这道在没加读入优化时间在20s左右的题终于在大米饼两天的死缠烂打.鬼混.乱整乱撞后艰难地AC了.但惋惜的是,大米饼一号代码其实更加简洁,但至今找不出BUG,我将它放在下面,也许有一天从远方来的另一个大 ...

  10. hdu 5607 BestCoder Round #68 (矩阵快速幂)

    graph  Accepts: 9 Submissions: 61  Time Limit: 8000/4000 MS (Java/Others)  Memory Limit: 65536/65536 ...