View the console
# tail-f Catalina.out
Script Execution Permissions
chmod u+x *.sh
#看是否已经有tomcat在运行了
Ps-ef |grep Tomcat
#如果有, use kill;
Kill-9 pid #pid for the corresponding process number
For example Ps-ef |grep tomcat output is as follows
Sun 5144 1 0 10:21 pts/1 00:00:06/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 number PID = 5144
Kill-9 5144 will kill Tomcat completely.
#直接查看指定端口的进程pid
Netstat-anp|grep 9217
#结果为 TCP 0 0::: 9217:::* LISTEN 26127/java
#则26127为9217这个端口的tomcat进程的pid, and then you can kill the process.
Kill-9 26127
#然后再启动tomcat即可
Linux under Tomcat management view Console | Kill Tomcat process