-pm2: command not found 报错

root 下运行

npm i -g pm2
or
sudo npm i -g pm2

然后测试 pm2 是否安装可行

 pm2 start server.js

个人笔记记录