1.查看是否有tomcat运行apache
ps -ef|grep tomcat
若是有tomcat运行结果以下tomcat
若是tomcat服务没有运行,结果以下日志
root 8522 6570 0 22:06 pts/1 00:00:00 grep --color=auto tomcat
2.经过pid关闭进程code
命令kill -9 pid 可关闭对应pid的服务进程
以前查出tomcat服务的pid为8418,则可经过如下命令杀死进程grep
kill -9 8418
3.查看tomcat运行状态 im
进入到tomcat的logs目录img
cd /usr/tomcat/apache-tomcat-7.0.82/logs/
执行一下命令实时查看运行日志co
tail -f catalina.out
经过Ctrl+c 退出tail命令。ps