Set Tomcat under Ubuntu to become a service (boot boot)

Source: Internet
Author: User

1. Copy the catalina.sh in the Bin folder under the Tomcat installation directory to/ETC/INIT.D and modify the name Tomcat

Cp/path/to/tomcat/bin/catalina.sh/etc/init.d

Cd/etc/init.d

MV Catalina.sh Tomcat

Execute the above three commands separately if you are prompted to add sudo at the beginning of the error

2. Open the Tomcat file

sudo gedit Tomcat


3. Modify the Tomcat file additions


catalina_home=opt/apache-tomcat-6.0.32

Java_home=/usr/lib/jvm/java-6-sun

4. Start the Tomcat service using the service command

Cd/etc/init.d

Service Tomcat start #如果出错, please add sudo in front

5. Stop the Tomcat service

Service Tomcat stop# If there is an error, please add sudo to the front

The first three steps are to create a script to start Tomcat, which can accept parameters such as start stop restart. This script can also be written in other scripting languages.

Set Tomcat under Ubuntu to become a service (boot boot)

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.