zoukankan      html  css  js  c++  java
  • nginx lua模块安装

    1、安装LuaJIT,LuaJIT为LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language

    wget http://luajit.org/download/LuaJIT-2.0.5.tar.gz
    tar -zxvf LuaJIT-2.0.5.gz && cd LuaJIT-2.0.5
    make && make install PREFIX=/usr/local/luajit
    #导入两个环境变量

    export LUAJIT_LIB=/usr/local/luajit/lib
    export LUAJIT_INC=/usr/local/luajit/include/luajit-2.0

    2、下载ngx_devel_kit、和lua-nginx-module

    wget https://github.com/simplresty/ngx_devel_kit/archive/v0.3.1rc1.tar.gz
    tar -xzvf ngx_devel_kit-0.3.1rc1.tar.gz
    
    wget https://github.com/openresty/lua-nginx-module/archive/v0.10.14rc3.tar.gz
    tar -xzvf v0.10.14rc3.tar.gz

    按前一篇文章的步骤重新编译nginx即可,RedHat 6.6下安装nginx,配置HTTPS,注意在configure时候新增参数

    ./configure --sbin-path=/usr/local/sbin --with-http_stub_status_module --with-http_ssl_module --with-threads --with-stream --add-module=/root/ngx_devel_kit-0.3.1rc1 --add-module=/root/lua-nginx-module-0.10.14rc3
    make -j4 && make install

    启动nginx,如果有这个报错:nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory

      可以通过这样的方式来解决

    vi /etc/ld.so.conf

    新增一条 /usr/local/luajit/lib

    保存文件,执行ldconfig ,即可。

  • 相关阅读:
    ORACLE查询删除重复记录三种方法
    是否可以从一个static方法内部发出对非static方法的调用
    协程(微线程)
    多线程、多进程
    python3.6.5修改print的颜色
    Python之时间和日期模块
    Python之字符(2)
    Python之字符
    python之列表
    Python中的文件操作
  • 原文地址:https://www.cnblogs.com/befer/p/10074141.html
Copyright © 2011-2022 走看看