@參考文章java
原文以下:linux
linux本地檢測如何tomcat是否啓動成功? 解決方法: 1.curl 127.0.0.1:8080 第一能夠知道本地是否能夠訪問tomcat,返回頁面代碼 2.tail -f ./catalina.out 查看tomcat的logs目錄下的catalina.out文件,看到末尾有 22-Jun-2018 12:39:50.343 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 240280 ms,說明啓動成功。 3.ps -ef|grep tomcat 若是返回一大串東西,說明tomcat啓動成功。root 4479 1 0 12:35 pts/0 00:00:05 /usr/local/java/jdk1.8.0_162/bin/java -Djava.util.logging.config.file=/usr/local/apache-tomcat-8.5.31/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/apache-tomcat-8.5.31/bin/bootstrap.jar:/usr/local/apache-tomcat-8.5.31/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/apache-tomcat-8.5.31 -Dcatalina.home=/usr/local/apache-tomcat-8.5.31 -Djava.io.tmpdir=/usr/local/apache-tomcat-8.5.31/temp org.apache.catalina.startup.Bootstrap start 4.jps -v 結果中21702 Bootstrap表明有java程序的pid是21702 [root@VM_0_4_centos bin]# jps -v 21718 Jps -Denv.class.path=.:/usr/local/java/jdk1.8.0_192/lib:/usr/local/java/jdk1.8.0_192/jre/lib -Dapplication.home=/usr/local/java/jdk1.8.0_192 -Xms8m 21702 Bootstrap -Djava.util.logging.config.file=/usr/local/java/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -Dcatalina.base=/usr/local/java/tomcat8 -Dcatalina.home=/usr/local/java/tomcat8 -Djava.io.tmpdir=/usr/local/java/tomcat8/temp 本文地址:http://www.yayihouse.com/yayishuwu/chapter/1310