1. set catalina. copy sh to/etc/init. d and change the name to tomcatcp-r/opt/tomcat/catalina. sh/etc/init. dcd/etc/init. dmvcatalina. shtomcat2. open the tomcat file sudogedittomcat3. modify the tomcat file and add CATALINA_HOME = op.
1. Copy catalina. sh under tomcat 6 to/etc/init. d and change the name to tomcat.
Cp-r/opt/tomcat/catalina. sh/etc/init. d
Cd/etc/init. d
Mv catalina. sh tomcat
2. Open the tomcat File
Sudo gedit tomcat
3. Modify the tomcat file to add
CATALINA_HOME = opt/apache-tomcat-6.0.32
JAVA_HOME =/usr/lib/jvm/java-6-sun
# Chkconfig: 2345 10 90
# Description: Tomcat service
Save close
Chkconfig is used to start services in linux. you can install chkconfig through sudo apt-get install.
4. Set startup
You can use chkconfig tomcat on to complete the configuration.
You can also set it through rcconf to install sudo apt-get install rcconf.
Run Command Line rcconf. A graphical interface is displayed. Select the service as the upper/lower key. If the * sign is used, the system starts automatically. Locate tomcat and change the setting with a space. Press the tab key and press the cursor to confirm that the carriage return is complete.