在安裝完tomcat后想添加的開機自啟動的操作,但是報錯tomcat 服務不支持 chkconfig,后來在 /etc/init.d/tomcat中的#!/bin/bash后添加上#chkconfig: 2345 80 90,添加之后保存,然后在執行 chmod 755 /etc/init.d/tomcat 然后再 加入到自起動的列表中 chkconfig --add tomcat
查看自起列表: chkconfig --list|grep tomcat
tomcat 0:關閉 1:關閉 2:啟用 3:啟用 4:啟用 5:啟用 6:關閉
