查找jdk路径
[root@localhost ~]# java -version
[root@localhost ~]# which java
[root@localhost ~]# ls -lrt /usr/bin/java
[root@localhost ~]# ls -lrt /etc/alternatives/java
启动和关闭tomcat
1.进入tomcat的bin
cd /www/server/apache-tomcat-8.5.69/bin
2.运行bin目录下的启动命令脚本
sh startup.sh或者./startup.sh
3.关闭
sh shutdown.sh或者./shutdown.sh
4.看是否已经有tomcat在运行了
ps -ef |grep tomcat
5.停止线程
kill -9 pid