In linux, after tomcat is started and configured in linux, If you want tomcat to start automatically after it is configured in linux, another configuration is required. The following two methods are introduced! Tomcat startup Method 1: Modify tomcat/bin/startup automatically when Tomcat is started in linux. sh: export JAVA_HOME =/usr/java/j2sdk1.4.2 _ 08 export CLASSPATH = $ CLASSPATH: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/lib/dt. jar :. export PATH = $ PATH: $ JAVA_HOME/bin export CATALINA_HOME =/usr/local/tomcat/bin/catalina. sh start in/etc/rc. d/rc. add:/usr/local/tomcat/bin/startup to local. sh tomcat Boot Method 2: 1. Save the following code as a tomcat file and make it an executable file chmod 755 tomcat .#! /Bin/bash # kenny.zhou@tom.com #/etc/rc. d/init. d/tomcat # init script for tomcat precesses # processname: tomcat # description: tomcat is a j2se server # chkconfig: 2345 86 16 # description: Start up the Tomcat servlet engine. if [-f/etc/init. d/functions]; then. /etc/init. d/functions elif [-f/etc/rc. d/init. d/functions]; then. /etc/rc. d/init. d/functions else echo-e "\ atomcat: una Ble to locate functions lib. Cannot continue. "exit-1 fi RETVAL =$? CATALINA_HOME = "/usr/local/tomcat" case "$1" in start) if [-f $ CATALINA_HOME/bin/startup. sh]; then echo $ "Starting Tomcat" $ CATALINA_HOME/bin/startup. sh fi; stop) if [-f $ CATALINA_HOME/bin/shutdown. sh]; then echo $ "Stopping Tomcat" $ CATALINA_HOME/bin/shutdown. sh fi; *) echo $ "Usage: $0 {start | stop}" exit 1 ;; esac exit $ RETVAL # The above is the startup script code for tomcat startup 2. Copy the tomcat file to/etc/init. d/and run: chkconfig -- Add tomcat // indicates adding the tomcat service. 3. in tomcat/bin/catalina. add the following statement to the sh file: export JAVA_HOME =/YOURPATH/tomcat/jdk export CATALINA_HOME =/YOURPATH/tomcat export CATALINA_BASE =/YOURPATH/tomcat export CATALINA_TMPDIR =/YOURPATH/tomcat/temp start tomcat: service tomcat start stop tomcat: service tomcat stop so far, all the configuration for starting tomcat at startup is complete. tomcat will be automatically started next time you restart linux!