• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

nginxinstallluamodule

原作者: [db:作者] 来自: [db:来源] 收藏 邀请
#install luajit
#http://luajit.org/download.html

tar xzvf LuaJIT-2.0.4.tar.gz
cd LuaJIT-2.0.4
make install PREFIX=/home/allen.mh/local/luajit
sudo echo "/home/allen.mh/local/luajit/lib" > /etc/ld.so.conf.d/usr_local_luajit_lib.conf

#update bash_profile
export LUAJIT_LIB=/home/allen.mh/local/luajit/lib
export LUAJIT_INC=/home/allen.mh/local/luajit/include/luajit-2.0 

#download nginx module
#lua_nginx_module
http://github.com/chaoslawful/lua-nginx-module/tags
#ngx_devel_kit
https://github.com/simpl/ngx_devel_kit/tags

#install nginx 
#如果已经安装了,在源码包里重新编译即可
./configure --prefix=/home/allen.mh/local/nginx --with-http_ssl_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_rea
lip_module --with-pcre=/home/allen.mh/soft/pcre-8.36 --add-module=/home/allen.mh/soft/lua/ngx_devel_kit-0.2.19 --add-module=/home/allen.mh/soft/lua/lua-nginx-module-0.9.17r
c1 --add-module=/home/allen.mh/soft/lua/rds-json-nginx-module-0.13 --add-module=/home/allen.mh/soft/lua/redis2-nginx-module-master --add-module=/home/allen.mh/soft/lua/echo
-nginx-module-0.57 --with-debug

#已经安装了nginx的
sbin/nginx -s stop

make

make install

     location /hello {
            default_type 'text/plain'; 
            content_by_lua 'ngx.say("hello, lua")';                                                                                                                          
        }
#127.0.0.1:8000/hello
#如果输出: hello,lua
#install success

 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
lua+nginx 转发https请求有证书错误发布时间:2022-07-22
下一篇:
利用LUA协程实现FUTURE模式发布时间:2022-07-22
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap