前面两篇JMX远程监控Tomcat服务器是没配置密码的,下面介绍在Tomcat监控时配置用户密码。
来源博客:http://blog.csdn.net/fengshizty
具体Tomcat地址:http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html#Enabling_JMX_Remote
Note: This syntax is for Microsoft Windows. The command has to be on the same line. It is wrapped to be more readable. If Tomcat is running as a Windows service, use its configuration dialog to set java options for the service. For un*xes remove"set "
from beginning of the line.
set CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=%my.jmx.port% -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false |
||
- If you require authorization, add and change this :
-Dcom.sun.management.jmxremote.authenticate=tr