{"id":12792,"date":"2013-03-30T09:30:13","date_gmt":"2013-03-30T00:30:13","guid":{"rendered":"http:\/\/www.sssg.org\/blogs\/hiro345\/?p=12792"},"modified":"2013-03-30T10:08:11","modified_gmt":"2013-03-30T01:08:11","slug":"jconsole-%e3%81%a7-jboss7-%e3%82%92%e3%83%a2%e3%83%8b%e3%82%bf%e3%83%aa%e3%83%b3%e3%82%b0","status":"publish","type":"post","link":"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/12792.html","title":{"rendered":"jconsole \u3067 JBoss7 \u3092\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0"},"content":{"rendered":"<p>jconsole \u3067 JBoss7 \u3092\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u306b\u306f\u3001\u30e6\u30fc\u30b6\u767b\u9332\u304c\u5fc5\u8981\u3067\u3059\u3002JBoss7\u306e\u5834\u5408\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3092\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u304c\u3042\u308a\u307e\u3059\u304b\u3089\u3001Tomcat\u307b\u3069\u624b\u9806\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n<!--more--><br \/>\n<strong>\u6e96\u5099<\/strong><br \/>\n\u3053\u3053\u3067\u306f\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3092\u8d8a\u3048\u305f\u308a\u3059\u308b\u5834\u5408\u306e\u3053\u3068\u3082\u8003\u3048\u3066\u3001\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u63a5\u7d9a\u3059\u308b\u306b\u3042\u305f\u3063\u3066\u306f SSH \u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c9\u3067\u63a5\u7d9a\u3059\u308b\u65b9\u6cd5\u3092\u4f7f\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<ul>\n<li>jboss.localdomain\u3068\u3044\u3046\u30db\u30b9\u30c8\u3067tomcat\u3092\u7a3c\u50cd\u3057\u3066\u3044\u308b\u3068\u3057\u307e\u3059\u3002<\/li>\n<li>jboss.localdomain\u306e\u30de\u30b7\u30f3\u3067\u306f\u3001\/usr\/java\/jdk1.7.0_17 \u306b JDK7 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001JBoss7 \u3092 $HOME\/applications\/jboss-as-7.1.1.Final \u3078\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/li>\n<li>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30de\u30b7\u30f3\u3067\u306f\u3001JDK7\u306f$HOME\/applications\/java\/jdk1.7.0_17 \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001JBoss7 \u3092 $HOME\/applications\/jboss-as-7.1.1.Final \u3078\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><strong>\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u3067\u78ba\u8a8d<\/strong><br \/>\n\u307e\u305a\u306f\u3001\u540c\u3058\u30de\u30b7\u30f3\u3067 JBoss7 \u3068 jconsole \u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3042\u3089\u304b\u3058\u3081JBoss7\u3092\u8d77\u52d5\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u3067\u8d77\u52d5\u3057\u3066\u3044\u307e\u3059\u304b\u3089\u3001\u30dd\u30fc\u30c89999\u3067\u63a5\u7d9a\u3092\u3057\u307e\u3059\u3002\u30c9\u30e1\u30a4\u30f3\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\u3057\u305f\u5834\u5408\u306e\u63a5\u7d9a\u3067\u306f\u30dd\u30fc\u30c8\u306f4447\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ JAVA_HOME=\/usr\/java\/jdk1.7.0_17 $HOME\/applications\/jboss-as-7.1.1.Final\/bin\/standalone.sh \r\n<\/pre>\n<p>\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u306b\u306f\u3001JBoss7\u306b\u4ed8\u5c5e\u3057\u3066\u3044\u308b jconsole.sh \u3092\u4f7f\u3044\u307e\u3059\u3002\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u306f\u5fc5\u8981\u306a\u30af\u30e9\u30b9\u3092CLASSPATH\u3078\u8a2d\u5b9a\u3057\u3066\u3001\u5185\u90e8\u7684\u306b JDK \u306e jconsole \u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ JAVA_HOME=\/usr\/java\/jdk1.7.0_17 $HOME\/applications\/jboss-as-7.1.1.Final\/bin\/jconsole.sh\r\n<\/pre>\n<p>\u8d77\u52d5\u3057\u305f\u753b\u9762\u3067\u3001\u30d7\u30ed\u30bb\u30b9\u3078\u63a5\u7d9a\u3059\u308b\u3068\u3001JBoss7\u306e\u30e2\u30cb\u30bf\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>\u30ea\u30e2\u30fc\u30c8\u30de\u30b7\u30f3\u3067\u78ba\u8a8d<\/strong><br \/>\n\u6b21\u306b\u30ea\u30e2\u30fc\u30c8\u30de\u30b7\u30f3\u3067\u52d5\u4f5c\u3059\u308bJBoss7\u3078\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30de\u30b7\u30f3\u304b\u3089\u63a5\u7d9a\u3092\u3059\u308b\u5834\u5408\u306e\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u307f\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>jboss.localdomain\u4e0a\u3067\u3001\u7ba1\u7406\u30e6\u30fc\u30b6\u3092\u767b\u9332\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u7ba1\u7406\u30e6\u30fc\u30b6\u3092\u8ffd\u52a0\u3059\u308b\u306b\u306f\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ JAVA_HOME=\/usr\/java\/jdk1.7.0_17 $HOME\/applications\/jboss-as-7.1.1.Final\/bin\/add-user.sh \r\n<\/pre>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306a\u624b\u9806\u3067 user001 \u3092\u7ba1\u7406\u30e6\u30fc\u30b6\u3068\u3057\u3066\u767b\u9332\u3057\u305f\u3068\u3057\u307e\u3059\u3002\u300cPassword:\u300d\u306b\u5bfe\u3057\u3066\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\nWhat type of user do you wish to add? \r\n a) Management User (mgmt-users.properties) \r\n b) Application User (application-users.properties)\r\n(a): a\r\n\r\nEnter the details of the new user to add.\r\nRealm (ManagementRealm) : \r\nUsername : user001\r\nPassword : \r\nRe-enter Password : \r\nAbout to add user &#039;user001&#039; for realm &#039;ManagementRealm&#039;\r\nIs this correct yes\/no? yes\r\n<\/pre>\n<p>\u3053\u308c\u3067\u3001user001 \u306e\u8a8d\u8a3c\u60c5\u5831\u304c $JBOSS_HOME\uff08\u3053\u3053\u3067\u306f$HOME\/applications\/jboss-as-7.1.1.Final\uff09\u306e standalone\/configuration\/mgmt-users.properties \u3068 mgmt-users.properties \u3068\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306e\u3088\u3046\u306b\u3057\u3066\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ cat $HOME\/applications\/jboss-as-7.1.1.Final\/standalone\/configuration\/mgmt-users.properties\r\n$ cat $HOME\/applications\/jboss-as-7.1.1.Final\/domain\/configuration\/mgmt-users.properties\r\n<\/pre>\n<p>\u3053\u308c\u3067\u6e96\u5099\u304c\u3067\u304d\u307e\u3057\u305f\u3002JBoss7\u3092\u8d77\u52d5\u3057\u307e\u3059\uff08\u3059\u3067\u306b\u8d77\u52d5\u3057\u3066\u3044\u308b\u306a\u3089\u518d\u8d77\u52d5\u3092\u3057\u307e\u3059\uff09\u3002\u3053\u3053\u3067\u306f\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u3067\u8d77\u52d5\u3057\u3066\u3044\u307e\u3059\u304b\u3089\u3001\u30dd\u30fc\u30c89999\u3067\u63a5\u7d9a\u3092\u3057\u307e\u3059\u3002\u30c9\u30e1\u30a4\u30f3\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\u3057\u305f\u5834\u5408\u306e\u63a5\u7d9a\u3067\u306f\u30dd\u30fc\u30c8\u306f4447\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ JAVA_HOME=\/usr\/java\/jdk1.7.0_17 $HOME\/applications\/jboss-as-7.1.1.Final\/bin\/standalone.sh \r\n<\/pre>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30de\u30b7\u30f3\u3067\u306f\u6b21\u306e\u3088\u3046\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7528\u610f\u3059\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002SSH\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c9\u3092\u505c\u6b62\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3082\u7528\u610f\u3059\u308b\u3068\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u305d\u3061\u3089\u306f\u81ea\u5206\u3067\u8003\u3048\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n#!\/bin\/sh\r\nJDK_HOME=$HOME\/applications\/java\/jdk1.7.0_17\r\n#for mac\r\n#JDK_HOME=`\/usr\/libexec\/java_home -v 1.7`\r\nJBOSS_HOME=$HOME\/applications\/jboss-as-7.1.1.Final\r\n\r\nssh -f -N -L4447:localhost:4447 -L9999:localhost:9999 jboss.localdomain\r\n\r\nJAVA_HOME=$JDK_HOME $JBOSS_HOME\/bin\/jconsole.sh\r\n<\/pre>\n<p>\u8868\u793a\u3055\u308c\u308b\u753b\u9762\u3067\u3001RemoteProcess \u3078\u300c<strong>service:jmx:remoting-jmx:\/\/localhost:9999<\/strong>\u300d\u3001Username \u3078\u300cuser001\u300d\u3001Password \u3078\u767b\u9332\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u6307\u5b9a\u3057\u3066 OK \u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u63a5\u7d9a\u3057\u3066 JBoss7 \u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Java7 \u3067\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u306b\u3064\u3044\u3066\u306f\u3001\u300c<a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/technotes\/guides\/management\/agent.html\">Monitoring and Management Using JMX Technology &#8211; Java SE Monitoring and Management Guide<\/a>\u300d\u304c\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002Apache Tomcat7 \u3067\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u306b\u3064\u3044\u3066\u306f\u300c<a href=\"http:\/\/tomcat.apache.org\/tomcat-7.0-doc\/config\/listeners.html#JMX_Remote_Lifecycle_Listener_-_org.apache.catalina.mbeans.JmxRemoteLifecycleListener\">Apache Tomcat 7 Configuration Reference (7.0.37) &#8211; The LifeCycle Listener Component<\/a>\u300d\u304c\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>jconsole \u3067 JBoss7 \u3092\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u306b\u306f\u3001\u30e6\u30fc\u30b6\u767b\u9332\u304c\u5fc5\u8981\u3067\u3059\u3002JBoss7\u306e\u5834\u5408\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3092\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u304c\u3042\u308a\u307e\u3059\u304b\u3089\u3001Tomcat\u307b\u3069\u624b\u9806\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[246,686,830,1209],"class_list":["post-12792","post","type-post","status-publish","format-standard","hentry","category-java","tag-jboss","tag-jboss-as-7","tag-jconsole","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/12792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/comments?post=12792"}],"version-history":[{"count":4,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/12792\/revisions"}],"predecessor-version":[{"id":12797,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/12792\/revisions\/12797"}],"wp:attachment":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/media?parent=12792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/categories?post=12792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/tags?post=12792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}