先修改Tomcat的启动脚本,windows下为bin/catalina.bat(linux下为catalina.sh),添加以下内容
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 指定是否需要密码验证
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"指定是否需要密码验证
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
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下conf目录中的resin.xml文件,在对应的<cluster id=”app”>节点下添加
编辑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的版本,编辑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
编辑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的版本,编辑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
默认开始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文件中,打开