-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
配置服务器Tomcat
进入$TOMCAT_HOME/bin目录下
vi catalina.sh #在# OS specific support.上面添加 export JAVA_OPTS='-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005'
重启Tomcat
./shutdown.sh
./startup.sh
vi /etc/sysconfig/iptables #在-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT之后添加 -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 5005 -j ACCEPT
如果嫌麻烦或者对安全要求不高直接关闭防火墙也行
service iptables stop
5223