zoukankan      html  css  js  c++  java
  • 笔记:JMX Configuration

    1.Setup forTomcat


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

    In Windows, modifythe file "${CATALINA_BASE}incatalina.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

  • 相关阅读:
    Java注解入门
    两种求素数
    几个经典的递归小程序
    Java8新特性——接口的默认方法和类方法
    SSH框架总结
    初识SSH框架
    Mybatis中DAO层接口没有写实现类,Mapper中的方法和DAO接口方法是怎么绑定到一起的
    使用SQL查询所有数据库名和表名
    mybatis中#{}和${}的区别
    SOCKET, TCP/UDP, HTTP, FTP 浅析
  • 原文地址:https://www.cnblogs.com/leeeee/p/7276603.html
Copyright © 2011-2022 走看看