root@localhost#cp /opt/tomcat/bin/catalina.sh /etc/rc.d/init.d/tomcat

root@localhost#vim  /etc/rc.d/init.d/tomcat

在tomcat中加入

#chkconfig: 35 84 16

#description: tomcat

export CATALINA_HOME=(tomcat的HOME路径,如:/opt/tomcat)

保存退出。


root@localhost# ln -s /etc/rc.d/init.d/tomcat /etc/rc.d/rc5.d/S84tomcat

root@localhost# chkconfig --add tomcat

root@localhost# chkconfig tomcat on

测试:

root@localhost# service tomcat start

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2021-08-29
  • 2022-12-23
  • 2021-09-19
  • 2021-11-18
  • 2021-12-06
猜你喜欢
  • 2021-04-25
  • 2022-01-01
  • 2022-01-01
  • 2022-01-01
  • 2021-12-11
  • 2021-12-18
  • 2022-12-23
相关资源
相似解决方案