tomcat开启jmx 验证

1.修改JAVA_HOME/jre/lib/management/jmxremote.access

[plain]  view plain  copy
  1. monitorRole   readonly  
  2. controlRole   readwrite \  
  3.                create javax.management.monitor.*,javax.management.timer.* \  
  4.                unregister  

2.修改JAVA_HOME/jre/lib/management/jmxremote.password(将jmxremote.password.template重命名为jmxremote.password)

[plain]  view plain  copy
  1. monitorRole   你的密码  
  2. controlRole    你的密码  

3.复制jmxremote.access和jmxremote.password到CATALINA_HOME/conf目录下,并修改jmxremote.password的权限为600

[plain]  view plain  copy
  1. chmod 755 jmxremote.password  

4.在CATALINA_HOME/bin/catalinash的注释下加入两句话

[html]  view plain  copy
  1. export JAVA_HOME=/usr/java/jdk1.8.0_25  
  2. export CATALINA_HOME=tomcat目录  

5.在Execute The Requested Command下加入如下一句话

[html]  view plain  copy
  1. CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=192.168.1.243 -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.  
  2. jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=${CATALINA_HOME}/conf/jmxremote.password -Dcom.sun  
  3. .management.jmxremote.access.file=${CATALINA_HOME}/conf/jmxremote.access"  

[plain]  view plain  copy
  1. -Djava.rmi.server.hostname=192.168.1.245  
设置tomcat注册jmx的IP地址,不设置连不上

[plain]  view plain  copy
  1. -Dcom.sun.management.jmxremote.port=8999  
设置tomat注册jmx的端口号

[plain]  view plain  copy
  1. -Dcom.sun.management.jmxremote.ssl=false  
不适用ssl(使用ssl的配置没成功)

[plain]  view plain  copy
  1. -Dcom.sun.management.jmxremote.authenticate=true  
开启远程用户名和密码验证,如不需要开启可以设为false

6.重启tomcat即可


注意:如果是 MYECLIPSE 启动 tomcat,需要在 myeclipse 找到对应tomcat的配置参数加上。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值