升级软件用npm install -g来操作
需要将当前在运行的任务,迁移到新版的pm2上来,就是上面说的命令update了。
Be sure to have the latest version by doing `npm install pm2@latest -g` before doing this procedure.
[PM2] Applying action deleteProcessId on app [all](ids: [ 0 ])
[PM2] [jyj-pc-next](0) ✓
[PM2] [v] All Applications Stopped
[PM2] [v] PM2 Daemon Stopped
[PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
[PM2] Restoring processes located in /root/.pm2/dump.pm2
[PM2] Process /usr/bin/npm restored
升级完后显示
>>>> In-memory PM2 is out-of-date, do:
>>>> $ pm2 update
In memory PM2 version: 4.5.1
Local PM2 version: 4.5.5
-------------
██████╗ ███╗ ███╗██████╗ ██╗ ██╗ ██████╗
██╔══██╗████╗ ████║╚════██╗ ██║ ██╔╝██╔═══██╗
██████╔╝██╔████╔██║ █████╔╝ ██║ ██╔╝ ██║ ██║
██╔═══╝ ██║╚██╔╝██║██╔═══╝ ██║ ██╔╝ ██║ ██║
██║ ██║ ╚═╝ ██║███████╗ ██║██╔╝ ╚██████╔╝
╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═╝╚═╝ ╚═════╝
https://pm2.io/
Harden your Node.js Production Environment
- Real-time Monitoring Web Interface
- Pro Active Alerting System
- Production Profiling for Memory and CPU
- PM2 Runtime High Availability Fallback
Start using it by typing:
$ pm2 plus
-------------
[PM2] Applying action deleteProcessId on app [all](ids: [ 0 ])
[PM2] [jyj-pc-next](0) ✓
[PM2] [v] All Applications Stopped
[PM2] [v] PM2 Daemon Stopped
[PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
[PM2] Restoring processes located in /root/.pm2/dump.pm2
[PM2] Process /usr/bin/npm restored
>>>>>>>>>> PM2 updated