Name
====
opm - OpenResty Package Manager
Table of Contents
=================
* [Name](#name)
* [Status](#status)
* [Synopsis](#synopsis)
* [Description](#description)
* [Usage](#usage)
* [Global Installation](#global-installation)
* [Local Installation](#local-installation)
* [HTTP Proxy Support](#http-proxy-support)
* [Author Workflow](#author-workflow)
* [File dist.ini](#file-distini)
* [name](#name)
* [abstract](#abstract)
* [version](#version)
* [author](#author)
* [license](#license)
* [requires](#requires)
* [repo_link](#repo_link)
* [is_original](#is_original)
* [lib_dir](#lib_dir)
* [exclude_files](#exclude_files)
* [main_module](#main_module)
* [doc_dir](#doc_dir)
* [File .opmrc](#file-opmrc)
* [github_account](#github_account)
* [github_token](#github_token)
* [upload_server](#upload_server)
* [download_server](#download_server)
* [Version Number Handling](#version-number-handling)
* [Installation](#installation)
* [For opm](#for-opm)
* [Security Considerations](#security-considerations)
* [Credit](#credit)
* [TODO](#todo)
* [Author](#author)
* [Copyright and License](#copyright-and-license)
Status
======
Experimental.
Synopsis
========
For library users:
```bash
# show usage
opm --help
# 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
```
All the commands can follow the `--cwd` option to work in the current working
directory (under ./resty/modules/) instead of the system-wide location.
```bash
# install into ./resty_modules/ instead of the system-wide location:
opm --cwd get foo/lua-resty-bar
# check the locally installed packages under ./resty_modules/
opm --cwd list
# remove the locally installed packages under ./resty_modules/
opm --cwd remove lua-resty-bar
```
For library authors:
```bash
cd /path/to/lua-resty-foo/
opm build
# optional:
# cd lua-resty-foo-VERSION/ && opm server-build
# you may need to edit the ~/.opmrc file to set up your github
# personal access tokens. the first run of "opm upload" will create
# a boilerplate ~/.opmrc file for you.
opm upload
# cleaning up the leftovers of the opm build command.
opm clean dist
```
Description
===========
`opm` is the official OpenResty package manager, similar to
Perl's CPAN and NodeJS's npm in rationale.
We provide both the `opm` client-side command-line utility and
the server-side application for the central package repository in this
GitHub code repository.
The `opm` command-line utility can be used by OpenResty users to download
packages published on the central `opm` server (i.e., `opm.openresty.org`).
It can also be used to package and upload the OpenResty package to the server
for package authors and maintainers. You can find the source of `opm` under
the `bin/` directory. It is currently implemented as a standalone Perl script.
The server side web application is built upon OpenResty and written in Lua.
You can find the server code under the `web/` directory.
Unlike many other package management systems like `cpan`, `luarocks`, `npm`,
or `pip`. Our `opm` adopts a package naming discipline similar to `github`, that
is, every package name should be qualified by a publisher ID, as in
`agentzh/lua-resty-foo` where `agentzh` is the publisher ID while `lua-resty-foo`
is the package name itself. This naming requirement voids the temptation of
occupying good package names and also allows multiple same-name libraries to
coexist in the same central server repository. It is up to the user to decide
which library to install (or even install multiple forks of the same library
in different projects of hers). For simplicity, we simply map the GitHub
user IDs and organization IDs to the publisher IDs for `opm`. For this reason,
we use the GitHub personal access tokens (or oauth tokens) to authenticate
our package publishers. This also eliminates the sign-up process for `opm`
package authors altogether.
`opm` has built-in support for the `restydoc` tool, that is, the documentation
of the packages installed via `opm` is already indexed by `restydoc` and can
be viewed directly on the terminal with the `restydoc` tool.
`opm` currently only supports pure Lua libraries but we will add support for
Lua libraries in pure C or with some C components very soon. The vision is
to also add support for redistributing 3rd-party NGINX C modules as dynamic
NGINX modules via `opm` in the future. The OpenResty world consists of various
different kinds of "modules" after all.
We also have plans to allow the user to install LuaRocks packages via `opm`
through the special user ID `luarocks`. It poses a risk of installing
an OpenResty-agnostic Lua module which blocks the NGINX worker processes
horribly on network I/O, nevertheless, as the developers of `opm`, we always like choices,
especially those given to our users.
[Back to TOC](#table-of-contents)
Usage
=====
```
opm [options] command package...
Options:
-h
--help Print this help.
--install-dir=PATH Install into the specified PATH directory instead of the system-wide
OpenResty installation tree containing this tool.
--cwd Install into the current working directory under ./resty_modules/
instead of the system-wide OpenResty installation tree containing
this tool.
Commands:
build Build from the current working directory a package tarball ready
for uploading to the server.
clean ARGUMENT... Do clean-up work. Currently the valid argument is "dist", which
cleans up the temporary files and directories created by the "build"
command.
info PACKAGE... Output the detailed information (or meta data) about the specified
packages. Short package names like "lua-resty-lock" are acceptable.
get PACKAGE... Fetch and install the specified packages. Fully qualified package
names like "openresty/lua-resty-lock" are required. One can also
specify a version constraint like "=0.05" and ">=0.01".
list List all the installed packages. Both the package names and versions
are displayed.
remove PACKAGE... Remove (or uninstall) the specified packages. Short package names
like "lua-resty-lock" are acceptable.
search QUERY... Search on the server for packages matching the user queries in their
names or abstracts. Multiple queries can be specified and they must
fulfilled at the same time.
server-build Build a final package tarball ready for distribution on the server.
This command is usually used by the server to verify the uploaded
package tarball.
update Update all the installed packages to their latest version from
the server.
upgrade PACKAGE... Upgrade the packages specified by names to the latest version from
the server. Short package names like "lua-resty-lock" are acceptable.
upload Upload the package tarball to the server. This comma
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
OpenResty(openresty-1.21.4.1.tar.gz) OpenResty是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库、第三方模块以及大多数的依赖项。用于方便地搭建能够处理超高并发、扩展性极高的动态 Web 应用、Web 服务和动态网关。 OpenResty通过汇聚各种设计精良的 Nginx 模块(主要由 OpenResty 团队自主开发),从而将 Nginx 有效地变成一个强大的通用 Web 应用平台。这样,Web 开发人员和系统工程师可以使用 Lua 脚本语言调动 Nginx 支持的各种 C 以及 Lua 模块,快速构造出足以胜任 10K 乃至 1000K 以上单机并发连接的高性能 Web 应用系统。 OpenResty的目标是让你的Web服务直接跑在 Nginx 服务内部,充分利用 Nginx 的非阻塞 I/O 模型,不仅仅对 HTTP 客户端请求,甚至于对远程后端诸如 MySQL、PostgreSQL、Memcached 以及 Redis 等都进行一致的高性能响应。
资源推荐
资源详情
资源评论


















收起资源包目录





































































































共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论


YunFeiDong
- 粉丝: 178
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- Oracle-R12-采购模块操作手册.doc
- 单片机应用技术教材配套资源ppt课件(完整版).zip
- 南开大学2021年9月《计算机科学导论》作业考核试题及答案参考6.docx
- 南开大学2021年9月《DirectX程序设计》作业考核试题及答案参考11.docx
- NORFLASH存储芯片测试程序的设计.docx
- Web应用安全概览ppt课件.pptx
- Excel与数据处理-数据分析工具及应用.ppt
- 关于人工智能创作物地位的法律问题探究.docx
- java实训项目.doc
- 通信工程学科导论1B PPT.ppt
- 互联网的社会学意义分析.docx
- 计算机网络作业七与解答.doc
- Java 图书馆管理系统(附全代码)_课程设计报告.doc
- 软件销售方案.docx
- 2013计算机维护实习报告.doc
- 土方工程量计算软件 HTCAD简易操作手册.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
