阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区 (aliyun.com)
zabbix镜像-zabbix下载地址-zabbix安装教程-阿里巴巴开源镜像站 (aliyun.com)
5 Java 网关 (zabbix.com)
[root@zabbix-server ~]# yum install -y zabbix-java-gateway
[root@zabbix-server zabbix]# pwd
/etc/zabbix
[root@zabbix-server zabbix]# vim zabbix_java_gateway.conf
修改部分内容如下:
LISTEN_IP="0.0.0.0" #监听服务器地址
LISTEN_PORT=10052 #监听zabbix_java进程的端口,默认是10052
PID_FILE="/var/run/zabbix/zabbix_java.pid" #zabbix_java的pid路径
START_POLLERS=5 #zabbix_java的进程数
TIMEOUT=10 #zabbix_java超时时间
# 上述zabbix_java_gateway.conf 配置文件可不用修改,直接开启服务
[root@zabbix-server zabbix]# systemctl start zabbix-java-gateway.service
[root@zabbix-server zabbix]# systemctl enable zabbix-java-gateway.service
[root@zabbix-server zabbix]# systemctl status zabbix-java-gateway.service
[root@zabbix-server ~]# vim /etc/zabbix/zabbix_server.conf
JavaGateway=192.168.200.60 #本机IP地址
J avaGatewayPort=10052 #监听端口
StartJavaPollers=5 #打开5个监听项
[root@zabbix-server ~]# systemctl restart zabbix-server
[root@zabbix-agent-centos ~]# yum install java-1.8.0-openjdk-devel tomcat-admin-webapps tomcat-docs-webapp
[root@zabbix-agent-centos ~]# rpm -qa | grep tomcat
tomcat-jsp-2.2-api-7.0.76-16.el7_9.noarch
tomcat-lib-7.0.76-16.el7_9.noarch
tomcat-docs-webapp-7.0.76-16.el7_9.noarch
tomcat-el-2.2-api-7.0.76-16.el7_9.noarch
tomcat-7.0.76-16.el7_9.noarch
tomcat-servlet-3.0-api-7.0.76-16.el7_9.noarch
tomcat-admin-webapps-7.0.76-16.el7_9.noarch
# vim /etc/sysconfig/tomcat
CATALINA_OPTS="-Djava.rmi.server.hostname=192.168.200.70 -Djavx.management.builder.initial= -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
CATALINA_OPTS="
-Djava.rmi.server.hostname=192.168.200.70 # tomcat主机自己的IP地址,不要写zabbix服务器的地址
-Djavx.management.builder.initial=
-Dcom.sun.management.jmxremote=true # 启用远程监控JMX
-Dcom.sun.management.jmxremote.port=12345 # 默认启动的JMX端口号,要和zabbix添加主机时候的端口一致即可
-Dcom.sun.management.jmxremote.ssl=false # 不使用ssl认证
-Dcom.sun.management.jmxremote.authenticate=false"
[root@zabbix-agent-centos ~]# systemctl start tomcat
[root@zabbix-agent-centos ~]# systemctl enable tomcat
[root@zabbix-agent-centos ~]# systemctl status tomcat
[root@zabbix-agent-centos ~]# netstat -tunpl | grep java
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 9397/java
tcp6 0 0 :::42822 :::* LISTEN 9397/java
tcp6 0 0 :::8009 :::* LISTEN 9397/java
tcp6 0 0 :::33419 :::* LISTEN 9397/java
tcp6 0 0 :::8080 :::* LISTEN 9397/java
tcp6 0 0 :::12345 :::* LISTEN 9397/java
相关推荐
© 2020 asciim码
人生就是一场修行