美文网首页
pm2 autostart

pm2 autostart

作者: 9682f4e55d71 | 来源:发表于2017-04-06 18:42 被阅读58次
    1. 设置 pm2 开机启动,执行下面的脚本即可
    #!/bin/bash
    pm2 start /data/www/mobi/mobi_pm2.json && \
       pm2 save && \
       pm2 startup
    
    # then it has a file in /etc/init.d/pm2-root
    # [root@dbquan-pc ~]# chkconfig | grep pm2
    # pm2-root        0:off   1:off   2:on    3:on    4:on    5:on    6:off
    #
    # ok, nexttime reboot will auto restart pm2
    
    
    # [PM2] Freeze a process list on reboot via:
    # $ pm2 save
    #
    # [PM2] Remove init script via:
    # $ pm2 unstartup systemv
    

    相关文章

      网友评论

          本文标题:pm2 autostart

          本文链接:https://www.haomeiwen.com/subject/vfwqattx.html