jvisualvm监控远程服务器linux的tomcat
2016-11-22 14:54
381 查看
1.在tomcat的安装目录的bin文件夹的startup.sh的最后一行exec "$PRGDIR"/"$EXECUTABLE" start "$@" 之前加上下面的一段代码
export
CATALINA_OPTS="$CATALINA_OPTS
-Dcom.sun.management.jmxremote
-Djava.rmi.server.hostname=118.194.246.76 -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=/usr/local/tomcat80/conf/jmxremote.password
-Dcom.sun.management.jmxremote.access.file=/usr/local/tomcat80/conf/jmxremote.access"
参数说明:-Djava.rmi.server.hostname=xxx.xxx.xxx.xxx
主机地址,我配置的是外网地址
-Dcom.sun.management.jmxremote.port=xxx 端口号、配置完端口号之后需要将此端口开放出来 可以使用命令:iptables -A INPUT -p tcp --d port 端口号 -j ACCEPT
-Dcom.sun.management.jmxremote.authenticate=true 是否开启认证、false的时候可以不使用密码访问
-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=..
jmxremote相关文件在tomcat的conf目录创建
其中jmxremote.access文件的内容可以配置为:
username1 readonly
username2 readwrite
jmxremote.password文件可以配置为:
username1 password1
username2 password2
将以上俩文件放在对应配置目录tomcat/conf/下
并且将以上俩个文件访问权限配置成:
chmod 600 jmx*
2.注意localhost中配置的地址是否跟上面的hostname一致,可以使用命令hostname
-i查看,如果现实127.0.0.1,则需要vi /etc/hosts文件,修改为上面步骤1中的hostname的值
3.步骤1中的port需要是防火墙允许的,iptables
-A INPUT -p tcp --d port 端口号 -j ACCEPT 添加到防火墙允许范围,防火墙的关闭是 service iptables stop
4.本地window的jvisual工具便可以进行远程连接了。
export
CATALINA_OPTS="$CATALINA_OPTS
-Dcom.sun.management.jmxremote
-Djava.rmi.server.hostname=118.194.246.76 -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=/usr/local/tomcat80/conf/jmxremote.password
-Dcom.sun.management.jmxremote.access.file=/usr/local/tomcat80/conf/jmxremote.access"
参数说明:-Djava.rmi.server.hostname=xxx.xxx.xxx.xxx
主机地址,我配置的是外网地址
-Dcom.sun.management.jmxremote.port=xxx 端口号、配置完端口号之后需要将此端口开放出来 可以使用命令:iptables -A INPUT -p tcp --d port 端口号 -j ACCEPT
-Dcom.sun.management.jmxremote.authenticate=true 是否开启认证、false的时候可以不使用密码访问
-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=..
jmxremote相关文件在tomcat的conf目录创建
其中jmxremote.access文件的内容可以配置为:
username1 readonly
username2 readwrite
jmxremote.password文件可以配置为:
username1 password1
username2 password2
将以上俩文件放在对应配置目录tomcat/conf/下
并且将以上俩个文件访问权限配置成:
chmod 600 jmx*
2.注意localhost中配置的地址是否跟上面的hostname一致,可以使用命令hostname
-i查看,如果现实127.0.0.1,则需要vi /etc/hosts文件,修改为上面步骤1中的hostname的值
3.步骤1中的port需要是防火墙允许的,iptables
-A INPUT -p tcp --d port 端口号 -j ACCEPT 添加到防火墙允许范围,防火墙的关闭是 service iptables stop
4.本地window的jvisual工具便可以进行远程连接了。
相关文章推荐
- 使用jdk自带的jvisualvm.exe监控远程服务器中的tomcat
- Jvisualvm监控远程linux下Tomcat
- Jvisualvm监控远程linux下Tomcat
- jconsole监控远程linux下tomcat
- jprofiler 监控远程linux tomcat
- linux 配置tomcat运行远程监控(JMX)
- 用SrvRepor远程监控管理Linux服务器
- jconsole监控远程linux tomcat运行情况的配置 (转)
- !!!Tomcat服务器监控[{$latestVersion}]版 for Win,Linux(转载)
- Jconsole监控tomcat 的JVM内存(远程、linux、windows)
- Tomcat内存监控 JConsole / JProfiler 监控远程linux tomcat运行情况的配置
- Jconsole监控tomcat 的JVM内存(远程、linux、windows)
- JConsole监控远程Tomcat服务器
- jvisualvm监控远程tomcat
- JConsole监控远程Tomcat服务器
- !!!Tomcat服务器监控[{$latestVersion}]版 for Win,Linux(原创)
- jconsole监控远程linux tomcat运行情况的配置
- jconsole监控远程linux tomcat运行情况的配置 (转)
- JMX实现远程服务器Tomcat系统监控之二
- 【Nagios】nagios服务器添加监控远程Linux主机