The other articles are similar to those in coldfusion. You can directly present Tomcat6 and set the self-starting script on Ubuntu8.04:/etc/init. d/tomcat #! /Bin/sh # Tomcatauto-start # description: Auto-startstomcat # processname: tomcat # pidfile:/var/run/tomcat. pidexport
The rest are similar to the coldfusion article, so we will directly present Tomcat 6 to set the self-starting script on Ubuntu8.04:
/Etc/init. d/tomcat
#! /Bin/sh
# Tomcat auto-start
#
# Description: Auto-starts tomcat
# Processname: tomcat
# Pidfile:/var/run/tomcat. pid
Export JAVA_HOME =/usr/lib/jvm/java-6-sun
Case $1 in
Start)
Sh/opt/apache-tomcat-6.0.16/bin/startup. sh
;;
Stop)
Sh/opt/apache-tomcat-6.0.16/bin/shutdown. sh
;;
Restart)
Sh/opt/apache-tomcat-6.0.16/bin/shutdown. sh
Sh/opt/apache-tomcat-6.0.16/bin/startup. sh
;;
*)
Echo 'usage: tomcat start | stop | restart'
;;
Esac
Exit 0