1、启动脚本 nohup java -jar /data/demo.jar >> /data/nohup.out 2>&1 & 2、配置开机启动 1、修改rc.local vim /etc/rc.d/rc.local #追加配置 source /etc/profile bash /data/run.sh 2、修改rc.local文件权限 chmod 777 /etc/rc.d/rc.local 3、重启系统 init 6 4、验证 ps -ef | grep xxx.jar