Centos7.x做开机启动脚本

cat /etc/centos-release
  CentOS Linux release 7.4.1708 (Core)
uname -r
  3.10.0-693.11.1.el7.x86_64

 

vim /etc/rc.d/init.d/start.sh
#!/bin/bash
#chkconfig:2345 99 20    !!! 这句是重点 !!!
/tomcat9/tomcat-xxx-8087/bin/startup.sh
/tomcat9/tomcat-xxx-8086/bin/startup.sh
/tomcat9/tomcat-xxx-8081/bin/startup.sh
/tomcat9/tomcat-xxx-8088/bin/startup.sh
/tomcat9/tomcat-xxx-8089/bin/startup.sh
/tomcat9/tomcat-xxx-8019/bin/startup.sh


chmod +x /etc/rc.d/init.d/start.sh
cd /etc/rc.d/init.d/
chkconfig --add start.sh
chkconfig start.sh on

posted @ 2019-04-18 14:26  Linux大魔王  阅读(215)  评论(0编辑  收藏  举报