Linux Install Tomcat Error: service tomcat does not support chkconfig

Installing Tomcat under Linux

 1 //Decompress
 2 # tar zxvf apache-tomcat-7.0.92.tar.gz
 3 // Copy to the init.d directory
 4 # cp -p /usr/tomcat/apache-tomcat-7.0.92/bin/catalina.sh /etc/init.d/tomcat
 5 # chmod 755 /etc/init.d/tomcat 
 6 # chkconfig --add tomca
 7 //add tomcat and java directories
 8 # vim /etc/init.d/tomcat
 9 // finally start tomcat directly
10 # chkconfig tomcat on
11 # service tomcat start

Copy catalina.sh to the init. D directory to ensure that Tomcat can be started anywhere. Use service Tomcat start to start Tomcat more conveniently

Problems:

service tomcat does not support chkconfig

Add:

#chkconfig:2345 10 90

And Java_ Home and Catalina_ Home address, here I am:

JAVA_HOME=/usr/java/jdk1.8.0_191/
CATALINA_HOME=/usr/tomcat/apache-tomcat-7.0.92

Renewal operation:

#chkconfig –add tomcat

About Oct

Similar Posts: