Nginx中间件之Nginx+Lua环境


https://www.imooc.com/article/19597

test2026-06-14 21:40


/usr/local/openresty/bin/openresty -t -c /usr/local/openresty/nginx/conf/nginx.conf

OpenResty 的可执行文件通常叫openresty,而不是nginx


Nginx调用lua模块指令


test2026-06-15 16:51


安装memcached

yum install memcached

lua调用memcached

#wget https://github.com/agentzh/lua-resty-memcached/archive/v0.11.tar.gz
#tar -zxvf v0.11.tar.gz
#cp -r lua-resty-memcached-0.11/lib/resty /usr/local/share/lua/5.1/


test2026-06-16 10:07


启动memcached

sudo systemctl start memcached

test2026-06-16 10:21


连接memcached

telnet 127.0.0.1 11211

test2026-06-16 10:34


memcached设置

set 192.168.2.2 0 0 1

1

test2026-06-16 10:35