Troubleshoot Tomcat self-boot issues under Ubuntu 12.04

Source: Internet
Author: User
Tags tomcat

When we installed the Tomcat, we found that each boot required to manually type sudo/var/tomcat/bin/startup.sh in the terminal, so how do we solve the problem?

The following are my solutions:

1. First open the terminal, input su, and then enter the root password to obtain root permissions. Enter the/etc folder (using the CD/ETC command)

2. Open rc.local file (use VI rc.local command in/etc directory)

The 3.rc.local file content defaults to the following

#!/bin/sh-e

#

# rc.local

#

# This script are executed at the end of each multiuser runlevel.

# Make sure that script would ' 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

Exit 0

4. Red content for our manually added content, here refers to the Tomcat startup item, then how to change it, first type A into insert mode, move the cursor to the red position to enter the exact path, press ESC to exit Insert mode, the cursor moved to the end of the line, type: Wq Save the file

Now that we've solved this problem, we've restarted Ubuntu and we've found that we can automatically access the content under Tomcat.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.