Set Tomcat to start the service in Ubuntu

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.