zoukankan      html  css  js  c++  java
  • JConsole远程连接配置 服务器监控工具

    1.在远程机的tomcat的catalina.sh的# OS specific support.  $var _must_ be set to either true or false.下加入配置:

    JAVA_OPTS="-Djava.rmi.server.hostname=192.168.10.150 -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.rmi.port=12345 -Dcom.sun.manage
    ment.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

    或者使用以下读取权限配置的方法:

    JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=192.168.202.121 -Dcom.sun.management.jmxremote"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=12345"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=true"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.pwd.file=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2.x86_64/jre/lib/management/jmxremote.password"

    2.配置权限文件

    [root@localhost bin]# cd /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2.x86_64/jre/lib/management/
    
    [root@localhost management]# cp jmxremote.password.template jmxremote.password
    
    [root@localhost management]# vi jmxremote.password

    monitorRole QED
    controlRole chenqimiao

    3.配置权限文件为600

    1
    [root@localhost management]# chmod 600 jmxremote.password jmxremote.access

      

    这样基本配置就结束了,下面说两个坑,第一个就是防火墙的问题,要开放指定端口的防火墙,我这里配置的是12345端口,

    vi /etc/sysconf/iptable

    -A INPUT -p tcp -m state --state NEW -m tcp --dport 12345 -j ACCEPT

    然后重启 service iptables restart

    第二个是hostname的问题

    1
    [root@localhost lib]# vi /etc/hosts

    请将127.0.0.1修改为本地真实的IP,我的服务器IP是192.168.202.121

  • 相关阅读:
    为什么 PCB 生产时推荐出 Gerber 给工厂?
    Fedora Redhat Centos 有什么区别和关系?
    【KiCad】 如何给元件给元件的管脚加上划线?
    MCU ADC 进入 PD 模式后出现错误的值?
    FastAdmin 生产环境升级注意
    EMC EMI 自行评估记录
    如何让你的 KiCad 在缩放时不眩晕?
    KiCad 5.1.0 正式版终于发布
    一次单片机 SFR 页引发的“事故”
    java基础之集合
  • 原文地址:https://www.cnblogs.com/bzdmz/p/10249046.html
Copyright © 2011-2022 走看看