Linux problems-solve Tomcat self-startup problems in Ubuntu 12.04

Source: Internet
Author: User

Linux problems-Solve the Problem of Tomcat self-startup in Ubuntu 12.04. After Tomcat is installed and used, we find that we need to manually type sudo/var/tomcat/bin/startup in the terminal for each startup. sh, how can we solve this problem? The following is my solution: 1. first open the terminal, enter su, and then enter the ROOT password to obtain the ROOT permission. Enter the/etc folder (use the cd/etc command) 2. open rc. local file (use vi rc in the/etc directory. local Command) 3. rc. the local file content is as follows by default #! /Bin/sh-e # rc. local ## This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # In order to enable or disable this script just change the execution # bits. # By default this script does nothing. /var/tomcat/bin/startup. sh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (Red part) exit 0 4. the red content is the content we manually add. Here it refers to the tomcat startup Item. How can we change it? First, type A to enter the INSERT mode, move the cursor to the red position, and enter the exact path, press ESC to exit INSERT mode, move the cursor to the end of the line, and type: wq to save the file. Now, we have solved this problem. Restart Ubuntu and we will find that the content under Tomcat can be automatically accessed.

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.