Vector000 / bilive_client

基于Node.JS的bilibili直播挂机系统
MIT License
150 stars 30 forks source link

关于PM2 #95

Closed pixia1234 closed 4 years ago

pixia1234 commented 4 years ago

我现在有一个centos实例,并且我有两个bilive——client(不同的工作目录,不同的设置)我现在想用PM2让它们同时运行,怎么办

gy39830 commented 4 years ago

先进入目录位置,然后 pm2 start npm --name (自己取个进程名字) -- start

pixia1234 commented 4 years ago

[root@VM_0_4_centos mine]# pm2 start npm --mine --start

error: unknown option `--mine'

gy39830 commented 4 years ago

pm2 start npm --name bilive -- start

pixia1234 commented 4 years ago

[root@VM_0_4_centos mine]# pm2 start npm --name bilive -- start [PM2] Starting /usr/local/bin/npm in fork_mode (1 instance) [PM2] Done. ⇆ PM2+ activated | Instance Name: VM_0_4_centos-5f36 | Dash: https://app.pm2.io/#/r/att6odcriue0nsc ┌─────┬──────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ ├─────┼──────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤ │ 1 │ bilive │ default │ N/A │ fork │ 6133 │ 0s │ 0 │ online │ 0% │ 3.5mb │ root │ disabled │ │ 0 │ bilive_client │ default │ 2.2.6 │ cluster │ 5044 │ 7m │ 4 │ online │ 0% │ 42.4mb │ root │ disabled │ └─────┴──────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘ [PM2][WARN] Current process list running is not in sync with saved list. Type 'pm2 save' to synchronize or enable autosync via 'pm2 set pm2:autodump true'

pixia1234 commented 4 years ago

谢谢,成功了