1、安装

npm install -g pm2

2、npm 启动

pm2 start -i 0 npm --name sunnesserver -- run start  # -i max 根据有效CPU数目启动最大进程数目

3、开机启动

pm2 save # 保存服务

pm2 startup # 把已启动服务加到systemd中

pm2 unstartup systemd # 删除自动启动服务

 

相关文章:

  • 2022-12-23
  • 2021-12-24
  • 2021-08-06
  • 2022-02-06
  • 2021-12-19
  • 2021-10-17
猜你喜欢
  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案