假如tomcat安装目录为:/usr/local/tomcat
进入tomcat安装目录后
cd /usr/local/tomcat
1:启动tomcat
./bin/startup.sh
2:关闭tomcat
./bin/shutdown.sh
3:查看tomcat日志
tail -f ./logs/catalina.out(查看到日志文件的末尾,需要按ctrl+c才能结束该命令)
tail -500 ./logs/catalina.out(查看最后500行)
4:清空日志
> ./logs/catalina.out
5:查看tomcat的进程号
ps aux|grep tomcat
6:杀死tomcat的进程
kill -9 进程号