#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
touch /var/lock/subsys/local
cd /root/huixisheng/node-servers/j-excel/ && forever index.js
进程管理器
pm2 https://github.com/Unitech/pm2
forever https://github.com/foreverjs/forever
自带命令nohup
Nodejs调试
nodemon
Monitor for any changes in your node.js application and automatically restart the server - perfect for development
supervisor https://github.com/petruisfan/node-supervisor/
开机启动
CentOS 7
/etc/rc.d/rc.local
文件的权限被降低了。需要执行chmod +x /etc/rc.d/rc.local
。软链接/etc/rc.local
MacOSX 开机启动 | 前端开发者说
综合