Openresty 学习笔记(一)opm 工具的使用,openrestyopm


1、自1.11.2.2开始,OpenResty版本已经包含并默认安装opm。所以通常你不需要自己安装opm。

2、我们在这里只需要做一个软连接就可以了

cd /usr/local/openresty/bin
sudo ln -s `pwd`/opm /usr/local/bin/opm

3、搜索指定软件包名称

www@TinywanAliYun:~$ opm search session
bungle/lua-resty-session                          Session Library for OpenResty - Flexible and Secure

4、搜索具有多个模式“lru”和“cache”的软件包名称和摘要。

www@TinywanAliYun:~$ opm search lru cache
openresty/lua-resty-lrucache                      Lua-land LRU Cache based on LuaJIT FFI

5、在一些作者的名字下安装名为lua-resty-logger-socket的软件包

www@TinywanAliYun:~$ opm get p0pr0ck5/lua-resty-logger-socket* Fetching p0pr0ck5/lua-resty-logger-socket  
  Downloading https://opm.openresty.org/api/pkg/tarball/p0pr0ck5/lua-resty-logger-socket-0.03.opm.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7423  100  7423    0     0  23691      0 --:--:-- --:--:-- --:--:-- 23715
Package p0pr0ck5/lua-resty-logger-socket 0.03 installed successfully under /usr/local/openresty/site/ .

 问题来了,结果在resty目录下没有这个文件下载下来

OpenResty 大跃进! opm 包管理尝鲜

 

相关内容