Files
nexus/wiki/entities/PM2.md
2026-04-14 16:02:50 +08:00

43 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
---
id: PM2
title: "PM2"
type: entity
tags: [node-js, process-manager, devops]
aliases: [pm2-process-manager]
---
## Definition
PM2 是 Node.js 应用程序的生产级进程管理器,提供进程守护、负载均衡、自动重启和开机自启功能。
## Core Properties
- **类型**:工具/进程管理器
- **技术栈**Node.js
- **安装命令**`npm install -g pm2`
- **官网**http://pm2.io
## Key Features
- 进程守护daemonize
- 自动重启
- 负载均衡cluster mode
- 开机自启(`pm2 startup` + `pm2 save`
- 进程监控(`pm2 monit`
- 日志管理(`pm2 logs`
- 进程列表(`pm2 list`
## Usage with Vibe-Kanban
```bash
pm2 start "HOST=0.0.0.0 PORT=9999 npx vibe-kanban" --name vibe-kanban
pm2 logs vibe-kanban
pm2 restart vibe-kanban
pm2 delete vibe-kanban
```
## Related Entities
- [[Vibe-Kanban]]PM2 管理的应用之一
- [[Node-js]]PM2 管理的运行时环境
## Connections
- [[PM2]] ← 管理进程 ← [[Vibe-Kanban]]
- [[PM2]] ← 依赖 ← [[Node-js]]