linux上使用tomcat及查看日志

启动

startup.sh

#执行
bin/startup.sh #启动tomcat
bin/shutdown.sh #停止tomcat
tail -f logs/catalina.out #看tomcat的控制台输出;

#看是否已经有tomcat在运行了
ps -ef |grep tomcat 
#如果有,用kill;
kill -9 pid #pid 为相应的进程号

如何实时查看日志

1、先切换到:cd usr/local/tomcat5/logs

2、tail -f catalina.out

3、这样运行时就可以实时查看运行日志了

链接:https://www.cnblogs.com/qlqwjy/p/8036091.html

          https://www.jianshu.com/p/6445f3b95542

原文地址:https://www.cnblogs.com/mike-mei/p/9143882.html