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

上一篇:Tomcat9 安装与配置


下一篇:tomcat9 点击bin目录下的startup.bat一闪而过