tengine安装lua,ngx_req_status

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tengine安装lua,ngx_req_status相关的知识,希望对你有一定的参考价值。

yum install pcre pcre-devel perl-ExtUtils-Embed

yum install openssl openssl-devel gcc


安装LuaJit

cd /usr/local/src 
tar  zxvf LuaJIT-2.0.1.tar.gz 
cd LuaJIT-2.0.1 

make

make install


安装tengine

tar zxvf tengine

cd tengine

export LUAJIT_LIB=/usr/local/lib

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

./configure --prefix=/usr/local/ --with-http_gzip_static_module --with-http_gunzip_module --with-pcre --with-http_lua_module --with-luajit-inc=/usr/local/include/luajit-2.0 --with-luajit-lib=/usr/local/lib --add-module=../ngx_req_status-master --with-http_perl_module

make&make install


常见错误

# /usr/local/nginx-1.4.2/sbin/nginx -v

./objs/nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory

解决方法:

# ln -s /usr/local/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2


开启防火墙

iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT




以上是关于tengine安装lua,ngx_req_status的主要内容,如果未能解决你的问题,请参考以下文章

应用篇| Tengine+Lua+Redis

使用tengine DSO 来动态编译安装第三方模块(Lua

使用tengine DSO 来动态编译安装第三方模块(Lua

技术干货听阿里云CDN安防技术专家金九讲tengine+lua开发

Tengine 安装

Centos7 安装 Tengine终极篇