Jboss6的开启JMX配置用于远程监控

1:修改JDK下面的jmx的配置文件:
切换至$JAVA_HOME所在目录/jre/lib/management下,
    I:将jmxremote.access、jmxremote.password.template权限调整为读写:

        #cp jmxremote.password.template jmxremote.password
        #chmod 600 jmxremote.password
        #chmod 600 jmxremote.access

    II:vi jmxremote.password去掉
        # monitorRole QED
        # controlRole R&D
        的#号
2:在Jboss的启动文件中添加以下信息(run.conf)

# ===========add these OPTS for JMX by Felix===================
JBOSS_HOME_DIR="/usr/local/jboss-6.1.0.Final"
JAVA_OPTS="${JAVA_OPTS} -Djava.rmi.server.hostname=192.168.10.35 -Dcom.sun.management.jmxremote.port=2899"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
# Use the JBoss MBeanServerBuilder
JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
#Use the jboss logmanager
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
JAVA_OPTS="$JAVA_OPTS -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl"
export JBOSS_CLASSPATH="${JBOSS_HOME_DIR}/lib/jboss-logmanager.jar"

#use the Sun/JDK MBeanServer
#JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
#JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.jmx.mbeanserver.JBossMBeanServerBuilder"
#export JBOSS_CLASSPATH="${JBOSS_HOME_DIR}/lib/jboss-mbeanserver.jar:${JBOSS_HOME_DIR}/lib/jboss-logmanager.jar"

# =========================== End ==============================

你可能感兴趣的:(jboss)