服務端 m01-61
關閉防火牆
/etc/init.d/iptables stop
[root@m01-61 x86_64]# getenforce
Disabled
[root@m01-61 x86_64]#
rz zabbix3.0.7_yum.tar.gz
tar xfP zabbix3.0.7_yum.tar.gz
yum -y --nogpgcheck -C install httpd zabbix-web zabbix-server-mysql zabbix-web-mysql zabbix-get mysql-server php55w php55w-mysql php55w-common php55w-gd php55w-mbstring php55w-mcrypt php55w-devel php55w-xml php55w-bcmath zabbix-get zabbix-java-gateway wqy-microhei-fonts net-snmp net-snmp-utils
rz zabbix_init.sh
sh zabbix_init.sh
10.0.0.61/zabbix
客戶端:
yum localinstall http://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/6/x86_64/zabbix-agent-3.0.7-1.el6.x86_64.rpm -y
修改配置文件
vim /etc/zabbix/zabbix_agentd.conf
可以用這個修改sed -i 's#Server=127.0.0.1#Server=172.16.1.61#' /etc/zabbix/zabbix_agentd.conf
/etc/init.d/zabbix-agent start
web上
配置---主機---zabbix--agent代理程序的接口172.16.1.61---更新--
創建主機----主機名稱 web01---可見的名稱web01(10.0.0.8/172.16.1.8)--agent代理程序的接口172.16.1.8--模板--- Template App HTTP Service Template App SSH Service Template ICMP Ping Template OS Linux----更新
在m01上 zabbix_get -s 172.16.1.8 -p 10050 -k "system.cpu.load[all,avg1]"
yum -y install wqy-microhei-fonts 修改爲中文字符
\cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
自定義模板
web01
sed -i '293a UserParameter=login-user,who|wc -l' /etc/zabbix/zabbix_agentd.conf
/etc/init.d/zabbix-agent restart
m01:
zabbix_get -s 172.16.1.8 -p 10050 -k "login-user"
http://www.onealert.com/index.html
用戶名爲Admin
密碼爲zabbix