sudo yum install lua-devel git
在github上查找 lua-zlib切到最新tag编译。把生成的zlib.so复制到openresty/lualib目录下 而后在lua代码中require zlib 并调用 具体参考文档github