笔记:JMX Configuration

1.Setup forTomcat


(1). Add the necessary parameters to Tomcat startup script:

In Windows, modifythe file "${CATALINA_BASE}\bin\catalina.bat",add thesearguments for JVM before the comment “rem ----Execute The RequestedCommand ------”:

setJAVA_OPTS=-Dcom.sun.management.jmxremote

-Dcom.sun.management.jmxremote.port=${Your JMX Port} 

-Dcom.sun.management.jmxremote.authenticate=true  

-Dcom.sun.management.jmxremote.ssl=false   

-Dcom.sun.management.jmxremote.access.file=mxremote.access  

-Dcom.sun.management.jmxremote.password.file=jmxremote.password 

In Linux, modify the file "${CATALINA_BASE}/bin/catalina.sh",add thesearguments for JVM before the comment “# ----Execute The RequestedCommand ------”:

JAVA_OPTS=”$JAVA_OPTS -Dcom.sun.management.jmxremote  

-Dcom.sun.management.jmxremote.port=${ Your JMX Port}  

-Dcom.sun.management.jmxremote.authenticate=true     

-Dcom.sun.management.jmxremote.ssl=false    

-Dcom.sun.management.jmxremote.access.file=jmxremote.access   

-Dcom.sun.management.jmxremote.password.file=jmxremote.password

(2). Edit the access authorizationfile jmxremote.access:

monitorRole readonly

controlRole readwrite

Edit the passwordfile jmxremote.password:

monitorRole yourpassword

controlRole yourpassword

These two files should be read-only and only accessible by theoperating system user Tomcat is running as. In Linux, run the command:

chmod 600jmxremote.access,

chmod 600jmxremote.password


2.Setup forGlassfish


(1). The default port for JMX is 8686.If you want tochange it,modify the node  "jmx-connector " of file ${GlassFish_Home}/domains/${Domain_Name}/config/domain.xml.

(2).The username and password for JMXare the same as the web console.


3.Setup forWebLogic


(1). Enable and configure the IIOPprotocol:

In the Change Center of theAdministration Console, click Lock & Edit.

In the left pane of the Console,expand Environment and select Servers.

Select the Protocols tab, thenselect IIOP.

Select the Enable IIOP check boxto enable the IIOP protocol.

To modify the defaultconfiguration, click Advanced.

In the Default IIOP User field,enter a user name.

In Default IIOP Password, enter apassword.

Modify default values for theother attributes.

To activate these changes, in theChange Center of the Administration Console, click ActivateChanges.

(2). The port for JMX is the sameas the web console, and the default value is7001.


4. Setup forJBoss


 (1). The default port for JMX is1090. If you want to change it, modify the file "${JBoss_Home}/server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml" .

(2). Enable authorization.

Modify the file " ${JBoss_Home}/server/default/deploy/jmx-jboss-beans.xml" , find the bean "JMXConnector", uncomment itsnode:

 jmx-console

Modify the file"${JBoss_Home}/server/default/conf/props/jmx-console-roles.properties" to configure the role of JMX.

admin=JBossAdmin,HttpInvoker

Modify the file "${JBoss_Home}/server/default/conf/props/jmx-console-users.properties" to configure the username and password of JMX.

admin=yourpassword

(3). Configure the DNS:

Modify file “/etc/hosts” of the host toadd the target IP and hostname.  Forexample, if the IP of JBoss is "10.1.2.16"and the target hostname is “SH-JMX-TEST”, add this line to“/etc/hosts”:

10.1.2.16   SH-JMX-TEST

(4)

For JBoss 4,5,6, copy ${JBoss_Home}/lib/jboss-bootstrap-api.jarto classpath

For JBoss 7.0, we do not need copyjars.

For JBoss 7.1, copy ${JBoss_Home}/bin/client/jboss-client.jarto classpath

(5)  StartJBoss:

${JBoss_Home}/bin/run.sh  -b 0.0.0.0 

or

${JBoss_Home}/bin/run.sh  -b  ${Binding IP}


5. Setup forWebSphere


(1). Thedefault port forJMX is 8880.Ifyou want to change it, modify the node "Applicationservers>${ServerName}>Ports>SOAP_CONNECTOR_ADDRESS"of web console.

The username and password of JMX is thesame as web console.

(2). Copy necessary client jarstothe path classpath including:

 ${WebSphere_Home}/AppServer/runtimes/com.ibm.ws.admin.client.jar

${WebSphere_Home}/AppServer/plugins/com.ibm.ws.security.crypto.jar 

(3). Copy necessary SSL filesto the file path  

${WebSphere_Home}/AppServer/profiles/${Profile_Name}/etc/DummyClientKeyFile.jks

${WebSphere_Home}/AppServer/profiles/${Profile_Name}/etc/DummyClientTrustFile.jks 

(4). Install IBM JDK (1.6 or higher version

转载于:https://www.cnblogs.com/leeeee/p/7276603.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值