Ubuntu tomcat self-starting apache-tomcat-6.0.28.tar.gz tomat version tar zvxf apache-tomcat-6.0.28.tar.gz switch path to tomcat bin directory. Tomcat self-starting: cp catalina. sh/etc/init. d mv catalina. sh tomcat open tomcat and find <xmlnamespace prefix = "o" ns = "urn: schemas-microsoft-com: office: office "/> cygwin = false os400 = false <xmlnamespace prefix =" st1 "ns =" urn: schemas-microsoft-com: office: smarttags "/> darwin = false before adding: CATALINA_HOME =/zjc/tomcat (tomcat main directory) JAVA_HOME =/zjc/jdk1.6.0 _ 27 (jdk main directory) // save, you can run the service tomcat start command in the/etc/init. d. Create a STARTUP script. For example, the content of the tomcat file is :#! /Bin/bash # Tomcat auto-start # description: Auto-starts tomcat # processname: tomcat # pidfile:/var/run/tomcat. pid # JAVA_HOME is jdk main directory export JAVA_HOME =/usr/java/jdk1.6.0 _ 27 case $1 instart) sh/usr/local/apache-tomcat-5.5.33/bin/startup. sh; stop) sh/usr/local/apache-tomcat-5.5.33/bin/shutdown. sh; restart) sh/usr/local/apache-tomcat-5.5.33/bin/shutdown. sh/usr/local/apache-tomcat-5.5.33/bin/startu P. sh; esacexit 0 ----------------------------------------------------------------------- the tomcat files generated in the preceding two methods can start the service. After service tomcat start/stopsudo chmod 755/etc/init. d/tomcat is successfully added to the system self-service: update-rc.d-f tomcat defaults Delete auto-start: udpate-rc.d-f tomcat remove.