OpenResty 是一个基于 Nginx 的全功能 Web 平台,它集成了大量精心设计的 Nginx 模块,以及大量的 Lua 库。在使用 OpenResty 时,有两种主要的包管理工具 OPM 和 LuaRocks。 OPM OPM(OpenResty Package Manager)是 OpenResty 官方提供的包管理工具,可以用来从中心 OPM 包服务器上面安装社区贡献的第三方模块。专门用于...
luarocksunpack// 解压一个使用pack 打包的包, luarocksinstall// 可以安装luarocks 仓库、rockspec 以及pack 的 luarocksupload// 进行包的上传(仓库) luarockslist// 查看安装的包 luarocksshow// 查看安装包的信息 luarocksremove// 移除安装的包 luarocksnew_version// 对于luarocks 项目提升版本号,比如集成...
它采用的是 FFI 的方式,所以,你需要在编译 OpenResty 的时候,先加上编译选项 ./configure --prefix=/opt/openresty \ --add-module=/path/to/lua-var-nginx-module -- 然后,使用 luarocks 的方式来安装 lua 库: luarocks install lua-resty-ngxvar -- 这里调用的方法也很简单,只需要一行 fetch 函数的调...
1. 安装方式 wget https://luarocks.github.io/luarocks/releases/luarocks-2.4.3.tar.gz tar -xzvf luarocks-2.4.3.tar.gz cd luarocks-2.4.3 ./configure --prefix=/usr/local/openresty/luajit \ --with-lua=/usr/local/openresty/luajit/ \ --lua-suffix=jit \ --with-lua-include=/usr/local...
openresty和 luarocks安装和geo-ip安装 1、openresty下载地址: wgethttp://openresty.org/download/ngx_openresty-1.9.3.1.tar.gz 2、安装依赖包 yuminstall-ygccgcc-c++readline-develpcre-developenssl-develtcl 3、安装OpenResty tarzxvfngx_openresty-1.9.3.1.tar.gz cdngx_openresty-1.9.3.1 ...
下载地址:https://luarocks.github.io/luarocks/releases cmd中执行(必须以管理员身份执行,否则安装会失败),其中PREFIX为OpenResty文件夹路径,安装成功也需要将D:\lua\openresty-1.15.8.2-win32\luarocks添加到系统环境变量中。 set PREFIX=D:\lua\openresty-1.15.8.2-win32 ...
openresty luarocks 安装以及openssl 问题处理 1. 安装方式 wgethttps://luarocks.github.io/luarocks/releases/luarocks-2.4.3.tar.gztar -xzvf luarocks-2.4.3.tar.gzcd luarocks-2.4.3./configure --prefix=/usr/local/openresty/luajit \ --with-lua=/usr/local/openresty/luajit/ \...
Openresty 集成 Luarocks 从官方网站下载最新版 luarocks 编译luarocks: ./configure --prefix=/usr/local/openresty/luajit \ --with-lua=/usr/local/openresty/luajit/ \ --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 验证:...
基于OpenResty 来安装 其实意在基于 OpenResty 自带的 Luajit 来安装 Luarocks, Luarocks 安装时需要指定 lua 目录和 lua 的 include 目录,而 OpenResty 自身带有的 Luajit 就包含所需的 Lua 解释器和头文件。 只不过 Luarocks 安装需要的是 Lua 而不是 Luajit,这就是关键的一步 ...
Luarocks是一个Lua包管理器,基于Lua语言开发,提供一个命令行的方式来管理Lua包依赖、安装第三方Lua包等,社区比较流行的包管理器之一,另还有一个LuaDist,Luarocks的包数量比LuaDist多。 更细节的两者对比可参阅这里 http://notebook.kulchenko.com/zerobrane/lua-package-managers-luadist-luarocks-and-integration-...