zabbix监控系统包括很多监控概念,掌握zabbix监控概念有助于对zabbix监控系统快速理解,zabbix常用术语及解释如下:
| 主机及配置信息 | 版 本 | IP 地址 |
|---|---|---|
| OS server | centos 7 | |
| Kernel version | 3.10.0-862.el7.x86_64 | |
| Zabbix-version | 5.0 | |
| Zbbix-server | 192.168.0.106 | |
| Zabbix-agent | 192.168.0.105 |
根据的操作系统选择你所需要的版本
作者是以apache和mysql作为底层环境支持

本例采用RPM包安装方式。源码也可以安装后续再录入;
准备好CentOS 7系统,配置IP地址,确保与互联网正常连接,
# ping www.baidu.com
# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
# yum clean all
# yum install zabbix-server-mysql zabbix-agent
# yum install centos-release-scl
[zabbix-frontend]
...
enabled=1
...
# yum install zabbix-web-mysql-scl zabbix-apache-conf-scl
# yum -y install mariadb-server mariadb
启动数据库
# systemctl start mariadb
初始化数据库安全
# mysql_secure_installation
[root@zabbix-server ~]# mysql -uroot -p
Enter password:
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> create user zabbix@localhost identified by 'zabbix';
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost;
MariaDB [(none)]> quit
导入初始架构和数据,系统将提示您输入新创建的密码
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
; php_value[date.timezone] = Asia/ShangHai
DBPassword=zabbix # 修改为你配置数据库zabbix用户的密码
# systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
# systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
# firewall-cmd --permanent --add-port=10050/tcp
# firewall-cmd --permanent --add-port=10051/tcp
# firewall-cmd --permanent --add-port=80/tcp
# firewall-cmd --permanent --add-port=3306/tcp
# firewall-cmd --reload
# setenforce 0 #设置为警告模式
SELINUX=disabled
编辑配置文件
配置Zabbix前端
连接到新安装的Zabbix前端: http://server_ip_or_name/zabbix

登录zabbix页面默认用户和密码 Admin zabbix

获取zabbix官方源
# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
# yum clean all
# yum -y install zabbix-agent
# systemctl start zabbix-agent
# systemctl enable zabbix-agent
# firewall-cmd --permanent --add-port=10050/tcp
# firewall-cmd --reload
zabbix服务端和客户端安装完毕之后,需通过zabbix server添加客户端监控,
zabbix web界面添加客户端监控步骤 :
Server=172.16.127.158
创建发现Action
zabbix发现规则创建完成,客户端agent安装后,被发现的IP主机不会自动添加至zabbix监控列表,需要添加发现动作;

部署环境的考虑
zabbix-server尽量部署在核心业务所在的机房,要求到各分节点的网络稳定。另外,要考虑到网络流量问题,做好安全策略。
hello 您好[]github.coom``
```> > >
-------
你好 你怎么找我呢
-------