标签:zabbix 监控
zabbix server:负责接收agent发送的报告信息的核心组件,所有配置,统计数据以及操作数据均由其组织进行。
database storage: 专用于存储所有配置信息,以及由zabbix收集的数据
web interface:zabbix 的GUI 接口,通常与server 运行在一台主机上。
proxy:可选组件,用于分布式监控环境中,代理server 收集部分被监控的监控数据并统一发往server 端。
agent:部署在被监控主机上,负责收集本地数据发往server 端或porxy端。
系统:centos 6.4
zabbix-server:192.168.1.19
mysql-server:192.168.1.18
下载rpm包:
[root@zabbix-server ~]# wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-get-2.2.4-1.el6.x86_64.rpm [root@zabbix-server ~]# wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-server-2.2.4-1.el6.x86_64.rpm [root@zabbix-server ~]# wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-2.2.4-1.el6.x86_64.rpm [root@zabbix-server ~]# wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-web-2.2.4-1.el6.noarch.rpm [root@zabbix-server ~]# wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-server-mysql-2.2.4-1.el6.x86_64.rpm [root@zabbix-server ~]# wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-web-mysql-2.2.4-1.el6.noarch.rpm
安装EPEL:
[root@zabbix-server ~]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm [root@zabbix-server ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
安装zabbix 服务端
[root@zabbix-server ~]# yum localinstall *.rpm -y [root@zabbix-server ~]# scp /usr/share/doc/zabbix-server-mysql-2.2.4/create/*.sql 192.168.1.18:/root
mysql服务器上安装 配置mysql:
[root@mysql-server ~]# yum install bison gcc gcc-c++ autoconf automake ncurses-devel cmake make openssl openssl-devel [root@mysql-server ~]# mkdir -p /mydata/data;groupadd -r mysql [root@mysql-server ~]# useradd -g mysql -r -d /mydata/data mysql [root@mysql-server ~]# tar -zxvf mysql-5.5.35.tar.gz [root@mysql-server ~]# cd mysql-5.5.35 [root@mysql-server mysql-5.5.35]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/mydata/data -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE=1 -DWITH_ARCHIVE_STORAGE=1 -DWITH_BLACKHOLE_STORAGE=1 -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_LIBWRAP=0 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci [root@mysql-server mysql-5.5.35]# make && make install [root@mysql-server mysql-5.5.35]# cd /usr/local/mysql [root@mysql-server mysql]# cp supports-file/my-large.cnf /etc/my.cnf [root@mysql-server mysql]# cp supports-file/mysql.server /etc/rc.d/init.d/mysqld [root@mysql-server mysql]# scripts/mysql_install_db --user=mysql --datadir=/mydata/data [root@mysql-server mysql]# /etc/init.d/mysqld start [root@mysql-server mysql]# chkconfig -add mysqld [root@mysql-server mysql]# vim /etc/profile.d/mysql.sh export PATH=$PATH:/usr/local/mysql/bin [root@mysql-server mysql]# source /etc/profile [root@mysql-server mysql]# mysqladmin -uroot password ‘redhat‘ [root@mysql-server mysql]# mysql -uroot -predhat -e "create database zabbix;" [root@mysql-server ~]# mysql -uroot -predhat zabbix < schema.sql [root@mysql-server ~]# mysql -uroot -predhat zabbix < images.sql [root@mysql-server ~]# mysql -uroot -predhat zabbix < data.sql
授权zabbix用户:
mysql> grant all on zabbix.* to ‘zbxuser‘@‘192.168.%.%‘ identified by ‘redhat‘; mysql> flush privileges;
zabbix 服务端:
[root@zabbix-server ~]# vim /etc/zabbix/zabbix_server.conf LogFile=/var/log/zabbix/zabbix_server.log LogFileSize=0 PidFile=/var/run/zabbix/zabbix_server.pid DBHost=192.168.1.18 DBName=zabbix DBUser=zbxuser DBPassword=redhat DBSocket=/tmp/mysql.sock SNMPTrapperFile=/var/log/snmptt/snmptt.log AlertScriptsPath=/usr/lib/zabbix/alertscripts ExternalScripts=/usr/lib/zabbix/externalscripts [root@zabbix-server ~]# /etc/init.d/zabbix-server start [root@zabbix-server ~]# netstat -nltpu | grep 10051 [root@zabbix-server ~]#vim /etc/php.ini date.timezone = Asia/Shanghai [root@zabbix-server ~]# /etc/init.d/httpd start
最后通过 http://192.168.1.19/zabbix/ 来配置
http://192.168.1.19/zabbix/index.php#
username:admin
password:zabbix (默认)
下一节介绍zabbix agent的相关监控配置。
本文出自 “小鱼儿” 博客,请务必保留此出处http://xiaoyuer3.blog.51cto.com/8622790/1539530
zabbix系列(一):zabbix server的安装配置,布布扣,bubuko.com
zabbix系列(一):zabbix server的安装配置
标签:zabbix 监控
原文地址:http://xiaoyuer3.blog.51cto.com/8622790/1539530