1.修改tomcat的catalina.sh文件,添加下面内容 vim bin/catalina.sh + 236 export CATALINA_OPTS="-Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx -Dcom.sun.management.jmxremote.port=xxx -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=/wdzj/java/Anti-spam-service/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/wdzj/java/Anti-spam-service/conf/jmxremote.access" 2.修改tomcat的catalina.sh文件,添加最后下面内容 vim tomcat/bin/startup.sh export CATALINA_OPTS="$CATALINA_OPTS" exec "$PRGDIR"/"$EXECUTABLE" start "$@"
3 重启tomcat
4.安装jvisualvm.exe
下载地址在:
https://visualvm.github.io/download.html
参考:https://my.oschina.net/kone/blog/157239
本文出自 “奋斗吧” 博客,请务必保留此出处http://lvnian.blog.51cto.com/7155281/1861529
原文地址:http://lvnian.blog.51cto.com/7155281/1861529