Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of Tomcat self-starting under Ubuntu 12.04

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains how to solve the Tomcat self-startup problem under Ubuntu 12.04. the content in the article is simple and clear, and it is easy to learn and understand. please follow the editor's train of thought to study and learn how to solve the Tomcat self-startup problem under Ubuntu 12.04.

When we install Tomcat and use it, we find that we need to manually type sudo / var/tomcat/bin/startup.sh in the terminal every time we start, so how do we solve this problem?

Here is my solution:

1. First open the terminal, enter su, and then enter the password of ROOT to get ROOT permission. Enter the / etc folder (use the cd / etc command)

two。 Open the rc.local file (use the vi rc.local command in the / etc directory)

The contents of the 3.rc.local file are 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

Exit 0

4. The red content is the content we added manually, which refers to the tomcat startup item, so how to change it? first, type A to enter INSERT mode, move the cursor to the red location, 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.

So far, we have solved this problem and restarted Ubuntu. We found that we can automatically access the content under Tomcat.

Thank you for your reading, the above is the content of "how to solve the Tomcat self-start problem under Ubuntu 12.04". After the study of this article, I believe you have a deeper understanding of how to solve the Tomcat self-start problem under Ubuntu 12.04. the specific use situation still needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report