在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
转子: http://www.cnblogs.com/shengshuai/p/4244851.html 参考: http://www.ttlsa.com/nginx/nginx-lua/ 学习:http://jinnianshilongnian.iteye.com/blog/2186448
安装 readline,lua 编译需要用到这个,centos 可以通过 yum 直接安装,如果不需要系统的,可以编译安装
yum install readline yum install readline-devel 或者手动编译: wget -c ftp://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz tar -zxvf readline-6.2.tar.gz cd readline-6.2 ./configure make && make installl 手动编译后如果指定了 prefix ,要修改一下 lua 的编译脚本 修改lua src/Makefile
修改MYCFLAGS=-I/usr/local/readline/include
修改MYLDFLAGS=-L/usr/local/readline/lib
直接执行lua命令,出现加载不了readline.so的问题,软链接 /usr/local/readline/lib/libreadline.so.6 到 /usr/lib/
下面安装 lua
wget http://www.lua.org/ftp/lua-5.3.0.tar.gz tar xf lua-5.3.0.tar.gz cd lua-5.3.0/ make linux make install cd .. wget http://luajit.org/download/LuaJIT-2.0.3.tar.gz tar xf LuaJIT-2.0.3.tar.gz cd LuaJIT-2.0.3/ make make install ln -s /usr/local/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2 export LUAJIT_LIB=/usr/local/lib export LUAJIT_INC=/usr/local/include/luajit-2.0/ cd .. 接下来就可以编译 tengine 了 yum install -y pcre-devel pcre
test:
location /lua_content {
base64
wget http://luaforge.net/frs/download.php/2664/luasocket-2.0.2.tar.gz |
请发表评论