Linux CentOS 查看Tomcat占用端口号

Linux CentOS 查看Tomcat占用端口号

一、操作步骤如下

1、 查看tomcat进程: ps -ef | grep tomcat

root      5517     1  0 21:45 pts/2    00:00:03 /usr/local/jdk1.8.0_171/bin/java -	Djava.util.logging.config.file=/usr/local/tomcat_home/tomcat7x64/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat_home/tomcat7x64/bin/bootstrap.jar:/usr/local/tomcat_home/tomcat7x64/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat_home/tomcat7x64 -Dcatalina.home=/usr/local/tomcat_home/tomcat7x64 -Djava.io.tmpdir=/usr/local/tomcat_home/tomcat7x64/temp org.apache.catalina.startup.Bootstrap start
root      5602  5316  0 21:56 pts/2    00:00:00 grep --color=auto tomcat




2、根据进程号查看端口号: netstat -anop | grep 5517

tcp        0      0 0.0.0.0:8009            0.0.0.0:*               LISTEN      5517/java            off (0.00/0/0)
tcp        0      0 0.0.0.0:88              0.0.0.0:*               LISTEN      5517/java            off (0.00/0/0)
tcp        0      0 127.0.0.1:8005          0.0.0.0:*               LISTEN      5517/java            off (0.00/0/0)
unix  2      [ ]         STREAM     CONNECTED     24567    5517/java   






引用资料: https://blog.csdn.net/liufuwu1/article/details/71123597


你可能感兴趣的:(Java)