# search package names and abstracts with the user pattern "lock". opm search lock
# search package names and abstracts with multiple patterns "lru" and "cache". opm search lru cache
# install a package named lua-resty-foo under the name of some_author opm get some_author/lua-resty-foo
# get a list of lua-resty-foo packages under all authors. opm get lua-resty-foo
# show the details of the installed package specified by name. opm info lua-resty-foo
# show all the installed packages. opm list
# upgrade package lua-resty-foo to the latest version. opm upgrade lua-resty-foo
# update all the installed packages to their latest version. opm update
# uninstall the newly installed package opm remove lua-resty-foo
例如,下载ledgetech/lua-resty-http模块:
1 2 3 4 5 6 7
4576e3cdb5be:/usr/local/openresty/# opm get ledgetech/lua-resty-http * Fetching ledgetech/lua-resty-http Downloading https://opm.openresty.org/api/pkg/tarball/ledgetech/lua-resty-http-0.17.1.opm.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 20622 100 20622 0 0 40595 0 --:--:-- --:--:-- --:--:-- 40594 Package ledgetech/lua-resty-http 0.17.1 installed successfully under /usr/local/openresty/site/ .