Restart Tomcat in Linux.
In Linux, restart Tomcat and run the command!
First, go to the bin directory under Tomcat
cd /usr/local/tomcat/bin
Use Tomcat to close the command
./shutdown.sh
Check whether Tomcat is disabled
ps -ef|grep java
If the following similar information is displayed, Tomcat is not closed.
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 directly kill Tomcat, you can use the kill command to directly kill the Tomcat process.
kill -9 7010
Check whether Tomcat is disabled.
ps -ef|grep java
If the following information is displayed, Tomcat is disabled.
root 7010 1 0 Apr19 ? 00:30:30 [java] <defunct>
Finally, start Tomcat
./startup.sh
Note: Use the root user to log on to the Linux system. Enter the Tomcat directory correctly. Restart Tomcat after you confirm that Tomcat is disabled. Otherwise, an exception occurs when the port is occupied.