跳转到主内容
极星编程网:以代码为星,赴技术山海!

JMX的配置

tomcatJMX配置 先修改Tomcat的启动脚本,windows下为bin/catalina.bat(linux下为catalina.sh),添加以下内容 不启用密码验证的配置: Window系统: set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote相关 JMX 代理侦听开关 -Djava.rmi.server.hostname=192.168.1.79服务器端的IP(linux系统必填) -Dcom.sun.management.jmxremote.port=10090相关 JMX 代理侦听请求的端口 -Dcom.sun.management.jmxremote.ssl=false指定是否使用 SSL 通讯 -Dcom.sun.management.jmxremote.authenticate=false指定是否需要密码验证 linux系统 CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote相关 JMX 代理侦听开关 -Djava.rmi.server.hostname=192.168.1.79服务器端的IP(linux系统必填) -Dcom.sun.management.jmxremote.port=10090相关 JMX 代理侦听请求的端口 -Dcom.sun.management.jmxremote.ssl=false指定是否使用 SSL 通讯 -Dcom.sun.management.jmxremote.authenticate=false"指定是否需要密码验证 启用密码验证 (注意密码验证文件的权限是否可读) Window系统 set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote 相关 JMX 代理侦听开关 -Dcom.sun.management.jmxremote.port=10090 相关 JMX 代理侦听请求的端口 -Dcom.sun.management.jmxremote.ssl=false 指定是否使用 SSL 通讯 - Dcom.sun.management.jmxremote.authenticate=true 指定是否需要密码验证 - Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access Linux系统: CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote相关 JMX 代理侦听开关 -Djava.rmi.server.hostname=192.168.1.79服务器端的IP(linux系统必填) -Dcom.sun.management.jmxremote.port=10090相关 JMX 代理侦听请求的端口 -Dcom.sun.management.jmxremote.ssl=false指定是否使用 SSL 通讯 -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access" 授权文件创建: 在tomcat/conf目录下新建jmxremote.access , jmxremote.password两个文件 (名字随意) *重命名jmxremote.password.template文件为jmxremote.password * 在 jmxremote.access 添加用户以及权限: admin readonly jzz readwrite * 在 jmxremote.password 添加用户对应的密码: admin 123456  #可自定义 jzz   123456  #可自定义 Resin JMX配置: 找到resin下conf目录中的resin.xml文件,在对应的

<

cluster id=”app”>节点下添加 不启用密码验证的配置

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=10090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=192.168.1.79

启用密码验证的配置

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=10090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Djava.rmi.server.hostname=192.168.1.79 -Dcom.sun.management.jmxremote.access.file=D:/work/server/resin-3.1.8/jmxremote.access -Dcom.sun.management.jmxremote.password.file=D:/work/server/resin-3.1.8/jmxremote.password

授权文件创建:同tomcat weblogic JMX配置: 不启用密码验证: window配置: 编辑WL_DOMAIN_HOME/bin/setDomainEnv.cmd,在文件结尾加入下面几行: set JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.rmi.server.hostname=192.168.1.79 set JAVA_OPTIONS=%JAVA_OPTIONS% -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote=true set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.port=10090 set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.ssl=false set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.authenticate=false linux系统: 对于Linux的版本,编辑WL_DOMAIN_HOME/bin/setDomainEnv. sh ,在文件结尾加入下面几行: JAVA_OPTIONS=”${JAVA_OPTIONS} -Djava.rmi.server.hostname=192.168.1.79” JAVA_OPTIONS=”${JAVA_OPTIONS} -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder” JAVA_OPTIONS=”${JAVA_OPTIONS} -Dcom.sun.management.jmxremote=true” JAVA_OPTIONS=”${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.port=10090” JAVA_OPTIONS=”${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.ssl=false” JAVA_OPTIONS=”${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.authenticate=false” export JAVA_OPTIONS 启用密码验证: window配置: 编辑WL_DOMAIN_HOME/bin/setDomainEnv.cmd,在文件结尾加入下面几行: set JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.rmi.server.hostname=192.168.1.79 set JAVA_OPTIONS=%JAVA_OPTIONS% -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote=true set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.port=10090 set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.ssl=false set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.authenticate = true set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.access.file=F:\soft_jzz\installSoft\weblogic\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\jmxremote.access set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.password.file=F:\soft_jzz\installSoft\weblogic\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\jmxremote.password linux系统: 对于Linux的版本,编辑WL_DOMAIN_HOME/bin/setDomainEnv. sh ,在文件结尾加入下面几行: JAVA_OPTIONS=”${JAVA_OPTIONS} -Djava.rmi.server.hostname=192.168.1.79” JAVA_OPTIONS=”${JAVA_OPTIONS} -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder” JAVA_OPTIONS=”${JAVA_OPTIONS} -Dcom.sun.management.jmxremote=true” JAVA_OPTIONS=”${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.port=10090” JAVA_OPTIONS=”${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.ssl=false” JAVA_OPTIONS=”${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.authenticate=true” JAVA_OPTIONS=”${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.access.file=F:\soft_jzz\installSoft\weblogic\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\jmxremote.access ” JAVA_OPTIONS=”${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.password.file=F:\soft_jzz\installSoft\weblogic\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\jmxremote.password” export JAVA_OPTIONS 授权文件创建:同tomcat JbossJMX配置: Jboss6: 默认开始JMX(端口1090) 以及无密码使用 修改端口地址:jboss-6.1.0.Final\server\default\conf\bindingservice.beans\META-INF\bindings-jboss-beans.xml 打开密码访问方式: 在jboss-6.1.0.Final\server\default\deploy\jmx-jboss-beans.xml文件中,打开jmx-console注释,同时配置用户角色密码,在jboss-6.1.0.Final\server\default\conf\props文件夹下,通过文件jmx-console-roles.properties、jmx-console-users.properties配置角色密码。

相关文章