-Dcom.sun.management.jmxremote //是否启用JMX
-Dcom.sun.management.jmxremote.port=9899 //连接端口
-Dcom.sun.management.jmxremote.authenticate=true //是否认证
-Dcom.sun.management.jmxremote.ssl=false //是否启用SSL
-Djava.rmi.server.hostname=192.168.1.21 //主机IP
-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password //密码文件
-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access //用户文件
配置过程如下
[[email protected] ~] #/usr/local/apache-tomcat-7.0.55/conf
[[email protected] conf]# vi jmxremote.access
[[email protected] conf]# vi jmxremote.password
guest readonly
manager readwrite
[[email protected] conf]# vi jmxremote.password
guest guest
manager manager
[[email protected] conf]# cd ../bin
[[email protected] bin]# vi catalina.shCATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9899 -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=192.168.1.21 -Dcom.sun.management.jmxremote.password.file=/usr/local/apache-tomcat-7.0.55/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/usr/local/apache-tomcat-7.0.55/conf/jmxremote.access"
[[email protected] conf]# chmod 600 jmx*
[[email protected] conf]# cd ../bin[[email protected] bin]# catalina.sh start
配置连接
连接成功后,可以看到运行情况