标签:zabbix
1、数据库授权:
mysql> create database zabbix charset utf8; Query OK, 1 row affected (0.00 sec) mysql> grant all on zabbix.* to "zbxuser"@"172.16.%.%" identified by "zbxpass"; Query OK, 0 rows affected (0.00 sec) mysql> grant all on zabbix.* to "zbxuser"@"node2.stu30.com" identified by "zbxpass"; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)
2、安装包:本实验是以同一台机器作为server端和agent端
[root@node2 zabbix-2.4]# ls zabbix-2.4.0-1.el6.x86_64.rpm zabbix-sender-2.4.0-1.el6.x86_64.rpm zabbix-agent-2.4.0-1.el6.x86_64.rpm zabbix-server-2.4.0-1.el6.x86_64.rpm zabbix-get-2.4.0-1.el6.x86_64.rpm zabbix-server-mysql-2.4.0-1.el6.x86_64.rpm zabbix-java-gateway-2.4.0-1.el6.x86_64.rpm zabbix-server-pgsql-2.4.0-1.el6.x86_64.rpm zabbix-proxy-2.4.0-1.el6.x86_64.rpm zabbix-web-2.4.0-1.el6.noarch.rpm zabbix-proxy-mysql-2.4.0-1.el6.x86_64.rpm zabbix-web-japanese-2.4.0-1.el6.noarch.rpm zabbix-proxy-pgsql-2.4.0-1.el6.x86_64.rpm zabbix-web-mysql-2.4.0-1.el6.noarch.rpm zabbix-proxy-sqlite3-2.4.0-1.el6.x86_64.rpm zabbix-web-pgsql-2.4.0-1.el6.noarch.rpm zabbix-release-2.4-1.el6.noarch.rpm
server端需要安装的包:
zabbix-server-2.4.0-1.el6.x86_64.rpm zabbix-server-mysql-2.4.0-1.el6.x86_64.rpm zabbix-web-mysql-2.4.0-1.el6.noarch.rpm zabbix-web-2.4.0-1.el6.noarch.rpm zabbix-2.4.0-1.el6.x86_64.rpm zabbix-get-2.4.0-1.el6.x86_64.rpm
agent端需要安装的包:
zabbix-2.4.0-1.el6.x86_64.rpm zabbix-agent-2.4.0-1.el6.x86_64.rpm zabbix-sender-2.4.0-1.el6.x86_64.rpm
安装软件包:
[root@node2 zabbix-2.4]# yum install -y zabbix-server-2.4.0-1.el6.x86_64.rpm zabbix-sender-2.4.0-1.el6.x86_64.rpm zabbix-server-mysql-2.4.0-1.el6.x86_64.rpm zabbix-web-mysql-2.4.0-1.el6.noarch.rpm zabbix-web-2.4.0-1.el6.noarch.rpm zabbix-get-2.4.0-1.el6.x86_64.rpm zabbix-2.4.0-1.el6.x86_64.rpm zabbix-agent-2.4.0-1.el6.x86_64.rpm
配置server端配置文件:
DBHost= DBName= DBUser= DBPassword=
导入数据库:
[root@node2 zabbix-2.4]# cd /usr/share/doc/ [root@node2 doc]# cd zabbix-server-mysql-2.4.0/create/ [root@node2 create]# ls data.sql images.sql schema.sql [root@node2 create]# mysql zabbix < schema.sql [root@node2 create]# mysql zabbix < images.sql [root@node2 create]# mysql zabbix < data.sql
启动服务:service zabbix-server start检查端口:修改/etc/php.ini,添加时区重启httpd服务并访问测试,此处一定要重启httpd服务,zabbix会在/etc/httpd/conf.d/中生成一个zabbix.conf的配置文件 http://172.16.30.2/zabbix
安装agent端[root@node2 zabbix-2.4]# yum install -y zabbix-agent-2.4.0-1.el6.x86_64.rpm zabbix-sender-2.4.0-1.el6.x86_64.rpm zabbix-2.4.0-1.el6.x86_64.rpm[root@node2 zabbix-2.4]# vim /etc/zabbix/zabbix_agentd.confServer=127.0.0.1启动服务service zabbix-agent start检查端口:在web服务端启动稍等片刻刷新网页
本文出自 “LINUXU” 博客,请务必保留此出处http://linuxu.blog.51cto.com/9471357/1613457
标签:zabbix
原文地址:http://linuxu.blog.51cto.com/9471357/1613457