Article Title: startup, shutdown, and killing of Tomcat in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Open Terminal
Cd/java/tomcat
# Execution
Bin/startup. sh # start tomcat
Bin/shutdown. sh # Stop tomcat
Tail-f logs/catalina. out # view tomcat console output;
# Check whether tomcat is running
Ps-ef | grep tomcat
# If yes, use kill;
Kill-9 pid # pid is the corresponding process number
For example, the ps-ef | grep tomcat output is as follows:
Sun 5144 1 0 00:00:06 pts/1/java/jdk/bin/java-Djava. util. logging. manager = org. apache. juli. classLoaderLogManager-Djava. endorsed. dirs =/java/tomcat/common/endorsed-classpath:/java/tomcat/bin/bootstrap. jar:/java/tomcat/bin/commons-logging-api.jar-Dcatalina. base =/java/tomcat-Dcatalina. home =/java/tomcat-Djava. io. tmpdir =/java/tomcat/temp org. apache. catalina. startup. bootstrap start
Then 5144 is the process ID pid = 5144
Kill-9 5144 to completely kill tomcat
# Directly view the process pid of the specified port
Netstat-anp | grep 9217
# The result is tcp 0 0: 9217: * LISTEN 26127/java.
#26127 is the pid of the tomcat process on port 9217, and then you can kill the process.
Kill-9 26127
# Then start tomcat.