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