openwrt中编译nginx-lua-module模块

背景

    最近在开发高铁CDN项目,由于我们的边缘节点的系统不是标准的centos(而是openwrt),所以在搭建lua-ngx开发环境中就遇到很多问题,最主要的问题是不能直接使用openresty这个平台。为了在nginx 中引入lua,我不得不考虑在ningx中把nginx-lua-module模块编译进来,此外,还需要在openwrt中编译出luajit。这里讲述在openwrt系统中编译nginx-lua-module。


    本文只是粗略记录下,有不懂得可以私信我。

一、系统环境

 

二、编译步骤

1、参数选择和下载第三方模块

nginx 编译:
#修改 auto/cc/name 10行 yes 为 no
#修改 auto/cc/conf 186行 yes 为 no  atomic
#修改 auto/cc/conf 207行 yes 为 no
#修改 auto/cc/conf 221行 yes 为 no
#修改 auto/os/linux 39行 yes 为 no  epoll
#修改 auto/types/sizeof 36行 $CC 为 gcc

下载第三方模块:
#ngx_devel_kit-0.3.1.zip 解压至 /home/huxl/ngx_devel_kit-0.3.1
#lua-nginx-module-0.10.15.zip 解压至 /home/huxl/lua-nginx-module-0.10.15

2、编译ngx-lua-module

source /opt/fsl-qoriq/2.0/environment-setup-aarch64-fsl-linux


编译:
cd /home/huxl/nginx-1.16.1

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值