防火墙
查看防火墙状态:
firewall-cmd --state
重启防火墙:
systemctl restart firewalld
查看端口
//根据端口查pid
[root@ecs-2 local]# netstat -anp|grep 8082
tcp6 0 0 :::8082 :::* LISTEN 24081/java
//根据进程名查询pid
ps -ef|grep tomcat
[root@ecs-2 local]# ps -ef |grep tomcat
root 23562 1 1 Sep18 ? 00:17:06 /usr/local/java/jdk1.8.0_191/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat8-oms-job/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Xms256m -Xmx1024m -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dproject.env=pressure -Dlog.level=INFO -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat8-oms-job/bin/bootstrap.jar:/usr/local/tomcat8-oms-job/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat8-oms-job -Dcatalina.home=/usr/local/tomcat8-oms-job -Djava.io.tmpdir=/usr/local/tomcat8-oms-job/temp org.apache.catalina.startup.Bootstrap -Dproject.env=pressure start
root 24081 1 1 Sep18 ? 00:13:51 /usr/local/java/jdk1.8.0_191/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat8-oms-rpc-invoice/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Xms256m -Xmx1024m -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dproject.env=pressure -Dlog.level=INFO -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat8-oms-rpc-invoice/bin/bootstrap.jar:/usr/local/tomcat8-oms-rpc-invoice/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat8-oms-rpc-invoice -Dcatalina.home=/usr/local/tomcat8-oms-rpc-invoice -Djava.io.tmpdir=/usr/local/tomcat8-oms-rpc-invoice/temp org.apache.catalina.startup.Bootstrap -Dproject.env=pressure start
root 25680 1 3 10:47 ? 00:02:24 /usr/local/java/jdk1.8.0_191/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat8-oms-rpc-b/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Xms256m -Xmx1024m -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dproject.env=pressure -Dlog.level=INFO -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat8-oms-rpc-b/bin/bootstrap.jar:/usr/local/tomcat8-oms-rpc-b/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat8-oms-rpc-b -Dcatalina.home=/usr/local/tomcat8-oms-rpc-b -Djava.io.tmpdir=/usr/local/tomcat8-oms-rpc-b/temp org.apache.catalina.startup.Bootstrap -Dproject.env=pressure start
root 26150 25440 0 12:01 pts/0 00:00:00 grep --color=auto tomcat
//查找pid 对应的服务进程
[root@ecs-2 local]# ps -ef |grep 24081
root 24081 1 1 Sep18 ? 00:13:46 /usr/local/java/jdk1.8.0_191/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat8-oms-rpc-invoice/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Xms256m -Xmx1024m -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dproject.env=pressure -Dlog.level=INFO -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat8-oms-rpc-invoice/bin/bootstrap.jar:
/usr/local/tomcat8-oms-rpc-invoice/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat8-oms-rpc-invoice -Dcatalina.home=/usr/local/tomcat8-oms-rpc-invoice -Djava.io.tmpdir=/usr/local/tomcat8-oms-rpc-invoice/temp org.apache.catalina.startup.Bootstrap -Dproject.env=pressure start
root 26048 25440 0 11:53 pts/0 00:00:00 grep --color=auto 24081
mvn --settings D:/mavenSetting/setting.xml clean package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -U -pl com.jy:jy-oms-rpc-invoice -am -Dproject.env=pressure