搭建ZabbixServer----Zabbix-proxy-----Zabbix-agent架构

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

搭建ZabbixServer----Zabbix-proxy-----Zabbix-agent架构环境:ZabbixServer:10.8.2.90Zabbixproxy:10.8.2.191Zabbixproxy-db:10.8.2.192ZabbixAgent:10.8.2.64安装前准备一、配置防火墙,开启10050、10051的TCP和UDP端口vim/etc/sysconfig/iptables#编辑防火墙配置文件-AINPUT-s10.8.15.201-mstate--stateNEW-mtcp-ptcp--dport10050:10051-jACCEPT-AINPUT-s10.8.15.201-mstate--stateNEW-mudp-pudp--dport10050:10051-jACCEPT:wq!#保存退出serviceiptablesrestart#重启防火墙使配置生效说明:192.168.21.127是Zabbix服务端的IP地址,表示端口只对此IP开放,如果要对所有IP开放,规则如下:-AINPUT-mstate--stateNEW-mtcp-ptcp--dport10050:10051-jACCEPT-AINPUT-mstate--stateNEW-mudp-pudp--dport10050:10051-jACCEPT二、关闭SELINUXvim/etc/selinux/config#SELINUX=enforcing#注释掉#SELINUXTYPE=targeted#注释掉SELINUX=disabled#增加:wq!#保存退出setenforce0#使配置立即生效ZabbixServer安装配置安装源[root@zabbix-servercreate]#rpm-ivh://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpmPreparing...###########################################[100%]1:zabbix-release###########################################[100%]Yum安装[root@zabbix-servercreate]#yuminstallzabbix-server-mysqlzabbix-web-mysql-y[root@zabbix-servercreate]#yuminstallzabbix-agent-y检查安装包[root@zabbix-servercreate]#rpm-qa|grepzabbixzabbix-server-2.4.6-1.el6.x86_64zabbix-web-2.4.6-1.el6.noarchzabbix-2.4.6-1.el6.x86_64zabbix-web-mysql-2.4.6-1.el6.noarchzabbix-agent-2.4.6-1.el6.x86_64zabbix-release-2.4-1.el6.noarchzabbix-server-mysql-2.4.6-1.el6.x86_64安装和启用mysql[root@zabbix-server~]#yuminstallmysqlmysql-server–y[root@zabbix-server~]#servicemysqldrestartStoppingmysqld:[OK]Startingmysqld:[OK]配置mysql[root@zabbix-server~]#mysqlWelcometotheMySQLmonitor.Commandsendwith;or\g.YourMySQLconnectionidis11Serverversion:5.1.73SourcedistributionCopyright(c)2000,2013,Oracleand/oritsaffiliates.Allrightsreserved.OracleisaregisteredtrademarkofOracleCorporationand/oritsaffiliates.Othernamesmaybetrademarksoftheirrespectiveowners.Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.mysqlcreatedatabasezabbixcharactersetutf8collateutf8_bin;mysqlgrantallprivilegesonzabbix.*tozabbix@localhostidentifiedby'zabbix';QueryOK,0rowsaffected(0.00sec)mysqlquit;[root@zabbix-server~]#cd/usr/share/doc/zabbix-server-mysql-2.4.6/create[root@zabbix-servercreate]#[root@zabbix-servercreate]#mysql-urootzabbixschema.sql[root@zabbix-servercreate]#mysql-urootzabbiximages.sql[root@zabbix-servercreate]#mysql-urootzabbixdata.sql同步时间[root@zabbix-servercreate]#ntpdate10.8.15.10910Nov14:06:30ntpdate[61649]:adjusttimeserver10.8.15.109offset-0.032635sec配置zabbix[root@zabbix-servercreate]#sed-i's/^.*DBPassword=.*$/DBPassword=zabbix/'/etc/zabbix/zabbix_server.conf[root@zabbix-servercreate]#servicezabbix-serverstartStartingZabbixserver:[OK][root@zabbix-servercreate]#servicezabbix-agentstartStartingZabbixagent:[OK]配置/etc/php.ini[root@zabbix-servercreate]#sed-i's/^.*date.timezone=.*$/date.timezone=Asia\/Shanghai/g'/etc/php.ini[root@zabbix-servercreate]#sed-i's/^.*post_max_size=.*$/post_max_size=16M/g'/etc/php.ini[root@zabbix-servercreate]#sed-i's/^.*max_execution_time=.*$/max_execution_time=300/g'/etc/php.ini[root@zabbix-servercreate]#sed-i's/^.*max_input_time=.*$/max_input_time=300/g'/etc/php.ini[root@zabbix-servercreate]#servicehttpdrestart[root@zabbix-servercreate]#chkconfigmysqldon[root@zabbix-servercreate]#chkconfigzabbix-serveron[root@zabbix-servercreate]#chkconfigzabbix-agenton[root@zabbix-servercreate]#chkconfighttpdon通过Web设置zabbix浏览器中输入地址:,则可看到如下初始化欢迎界面。PS:其中ip代表本地服务器对外开放的ip地址点击Next按钮后如下:检测zabbix各类需求通过之后即可点击Next按钮,如下:根据所要填写的需求填写,输入zabbix的密码,这里使用的密码是zabbix,然后点击Testconnection测试连接,显示绿色的“OK”代表数据库连接测试成功,即可点击Next,如下:预览配置信息,确认无误点击Next按钮,如下:预览配置信息,确认无误点击Next按钮,如下:预览配置信息,确认无误点击Next按钮,如下:查看日志,确认zabbix启动没问题[root@zabbix-servercreate]#tail-20/var/log/zabbix/zabbix_server.log12985:20151111:110853.253server#11started[trapper#3]12976:20151111:110853.253server#2started[dbwatchdog#1]12982:20151111:110853.254server#8started[unreachablepoller#1]12987:20151111:110853.256server#13started[trapper#5]12989:20151111:110853.256server#15started[alerter#1]12991:20151111:110853.256server#17started[timer#1]12984:20151111:110853.258server#10started[trapper#2]12986:20151111:110853.258server#12started[trapper#4]12988:20151111:110853.258server#14started[icmppinger#1]12990:20151111:110853.258server#16started[housekeeper#1]12980:20151111:110853.259server#6started[poller#4]12995:20151111:110853.262server#18started[httppoller#1]12997:20151111:110853.265server#20started[historysyncer#1]12998:20151111:110853.265server#21started[historysyncer#2]12999:20151111:110853.266server#22started[historysyncer#3]13001:20151111:110853.266server#24started[escalator#1]13000:20151111:110853.266server#23started[historysyncer#4]13008:20151111:110853.272server#25started[proxypoller#1]13009:20151111:110853.272server#26started[self-monitoring#1]12996:20151111:110853.330server#19started[discoverer#1]Zabbix中文乱码解决方法zabbix使用DejaVuSan.ttf字体,不支持中文,导致中文出现乱码。解决方法很简单,把我们电脑里面字体文件传到zabbix服务器上。1.乱码如下图zabbix乱

1 / 14
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功