Linux problems-solve the problem of Tomcat self-startup in Ubuntu12.04
Source: Internet
Author: User
Linux problems-solve the problem of Tomcat self-startup in Ubuntu12.04 when we have installed and used Tomcat, we found that every time we start it, we need to manually type sudo/var/tomcat/bin/startup in the terminal. sh, how can we solve this problem? The following is my solution: 1. first, type... 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.
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