Restart Tomcat under Linux, view Tomcat runtime logs in real time

Source: Internet
Author: User

Under the Linux system, reboot Tomcat to operate with commands!

First, go to the bin directory under Tomcat

Cd/usr/local/tomcat/bin

Using the Tomcat Close command

./shutdown.sh

To see if Tomcat is shutting down

Ps-ef|grep Java

If the following similar information is displayed, Tomcat is not turned off

Root      7010     1  0 Apr19?        00:30:13/usr/local/java/bin/java-djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties- Djava.awt.headless=true-dfile.encoding=utf-8-server-xms1024m-xmx1024m-xx:newsize=256m-xx:maxnewsize=256m-xx: Permsize=256m-xx:maxpermsize=256m-xx:+disableexplicitgc-djava.util.logging.manager= org.apache.juli.classloaderlogmanager-djava.endorsed.dirs=/usr/local/tomcat/endorsed-classpath/usr/local/ tomcat/bin/bootstrap.jar-dcatalina.base=/usr/local/tomcat-dcatalina.home=/usr/local/tomcat-djava.io.tmpdir=/ Usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap Start

* If you want to kill Tomcat directly, you can use the KILL command to kill the Tomcat process directly

Kill-9 7010

Then continue to see if Tomcat shuts down

Ps-ef|grep Java

If the following information is present, Tomcat is turned off

Root      7010     1  0 Apr19?        < defunct >

Finally, start Tomcat

Note: Log in to the Linux system using the root user, enter the Tomcat directory correctly, and then boot Tomcat after you have determined that Tomcat is closed, otherwise the newspapers port will be occupied abnormally.

View the Tomcat log

1, first switch to: CD usr/local/tomcat5/logs

2, Tail-f Catalina.out

3, so that the runtime can view the running log in real time

CTRL + C is the exit Tail command.

Restart Tomcat under Linux, view Tomcat runtime logs in real time

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.