Linux boot tomcat with console __linux

Source: Internet
Author: User

The startup, shutdown, and error tracking of Tomcat services under Linux, using Putty to remotely connect to the server, typically starts the shutdown Tomcat service in several ways:
Switch to the Bin directory (CD Usr/local/tomcat/bin) in the Tomcat home directory
1, start the Tomcat service
Mode one: Direct start./startup.sh
Mode two: Start Nohup/startup.sh as a service &
Mode three: the console dynamic output mode is started./catalina.sh Run dynamically displays the console output information in tomcat background, CTRL + C, and then exit and close the service
Explain:
By way of one, mode three boot Tomcat has a disadvantage, when the client connection is disconnected, the Tomcat service will immediately stop, through the way two can be used as Linux services have been running
By means of mode one, the way to start Tomcat, its log will be written to the corresponding log file, and not dynamically view the Tomcat console output information and error conditions, through mode three can be in console mode to start Tomcat service,
directly see the program running the background of the console output information, do not have to be very troublesome every time to open the Catalina.out log file to view, so as to facilitate tracking access to the background output information. The Tomcat console information includes output information such as log4j and System.out.println ().




Start Tomcat under windows and generally run Startup.bat directly, as shown in the following image after startup:

Linux starts directly under./startup.sh But the boot log information is not visible, and the Ps–ef|grep Tomcat view is actually started, as shown in the following illustration:

However, you can view Tomcat startup information like Windows by running./catalina.sh Run startup.



3,tomcat Runtime JVM Memory allocation
Configuration in MyEclipse under the ⑴ development environment
-xms256m-xmx512m-xx:newsize=64m-xx:maxnewsize=128m-xx:permsize=512m-xx:maxpermsize=512m
⑵, online environment (started directly via Catalina or startup command line)
Under ①linux: catalina.sh
# OS specific support. $var _must_ is set to either True or FALSE. Add the following line after the comment
Java_opts= "-server-xms256m-xmx1024m-xx:newsize=64m-xx:maxnewsize=512m-xx:permsize=512m-xx:maxpermsize=512m"



4. See if Tomcat is running the command:

Ps-ef | grep Tomcat


Using kill-9 PID

Kill the Tomcat process

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.