首先查找tomcat进程id
ps -ef|grep java
可能会查出很多例如:
root 1974 1 0 17:47 ? 00:00:03 ../jdk1.6.0_16/bin/java -Djava.security.policy=./policy.all -Djava.rmi.server.codebase=file:../dist/bca.jar com.bca.agent.dagent.DAgent
root 2042 1 0 17:47 ? 00:00:05 ../jdk1.6.0_16/bin/java -Djaer.useLocalHostname=true -Djava.security.policy=./policy.all com.bca.agent.cms.BcaCms
root 2162 1 0 17:47 ? 00:00:04 ../jdk1.6.0_16/bin/java -Djava.rmi.server.useLocalHostname=true -Djava.security.policy=./policy.all com.bca.agent.ivr.IVR
root 2242 1 0 17:47 ? 00:00:02 ../jdk1.6.0_16/bin/java -Djava.security.policy=./policy.all com.bca.agent.cms.ccdc.BcaCCDC
root 2716 2711 0 17:58 pts/1 00:00:03 /usr/java/jdk1.6.0_25/bin/java -Djava.util.logging.config.file=/usr/tomcat7.0.11/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/tomcat7.0.11/endorsed -classpath /usr/tomcat7.0.11/bin/bootstrap.jar:/usr/tomcat7.0.11/bin/tomcat-juli.jar -Dcatalina.base=/usr/tomcat7.0.11 -Dcatalina.home=/usr/tomcat7.0.11 -Djava.io.tmpdir=/usr/tomcat7.0.11/temp org.apache.catalina.startup.Bootstrap start
root 3498 30883 0 18:29 pts/1 00:00:00 grep java
可以看到红色字体的为tomcat进程,id为2716
然后运行命令:kill -9 2716即可