一、Server端配置:

1、设置主机名:hostname server

关闭防火墙:  systemctl stop firewalld.service 

                systemctl disable firewalld.service 

2、准备Zabbix-repo:

 [root@localhost~]#rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

3、安装Zabbix服务器:

[root@localhost ~]# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-get zabbix-agent

4、安装数据库:

[root@localhost ~]# yum -y install mariadb mariadb-server

5、启动数据库:

[root@localhost ~]#  systemctl enable mariadb

[root@localhost ~]#  systemctl start mariadb

6、授权zabbix账号:

[root@localhost ~]# mysql

MariaDB [(none)]>  create database zabbix character set utf8 collate utf8_bin;

MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by '123456';

MariaDB [(none)]> flush privileges;

7、初始化zabbix:

[root@localhost ~]# cd /usr/share/doc/zabbix-server-mysql-3.2.11/

[root@localhost zabbix-server-mysql-3.2.11]# zcat create.sql.gz | mysql -uroot zabbix

8、配置sql账号密码:

[root@localhost zabbix-server-mysql-3.2.11]# vim /etc/zabbix/zabbix_server.conf

  DBPassword=123456      这里是刚授权的密码

9、启动zabbix:

[root@localhost zabbix-server-mysql-3.2.11]# systemctl enable zabbix-server.service

[root@localhost zabbix-server-mysql-3.2.11]# systemctl start zabbix-server.service

[root@localhost zabbix-server-mysql-3.2.11]# vim /etc/httpd/conf.d/zabbix.conf

   php_value date.timezone Asia/Shanghai   默认值,只需要配置时区。

[root@localhost zabbix-server-mysql-3.2.11]# systemctl enable httpd

[root@localhost zabbix-server-mysql-3.2.11]# systemctl start httpd

10、打开http:IP/zabbix  例:http://10.0.0.147/zabbix

zabbix3.2版本部署文档_vim

11、检查组件是否OK

zabbix3.2版本部署文档_mysql_02

12、配置连接数据库

zabbix3.2版本部署文档_mysql_03

zabbix3.2版本部署文档_mysql_04

zabbix3.2版本部署文档_vim_05

zabbix3.2版本部署文档_vim_06

Username:Admin

Password:zabbix

13、显示中文乱码解决方法

①、在zabbix-server服务器上安装如下文件符集

[root@localhost zabbix-server-mysql-3.2.11]# yum install wqy-microhei-fonts

②、然后替换linux上默认的字符集

[root@localhost]#cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf

二、agent端:

1、设置主机名:hostname web1

防火墙:systemctl stop firewalld.service

Systemctl disable firewalld.service

2、准备zabbix-repo

[root@localhost~]#rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

3、安装zabbix-agent

[root@localhost ~]# yum -y install zabbix-agent

4、配置主服务器地址

[root@localhost ~]# vim /etc/zabbix/zabbix_agentd.conf

     Server=192.168.100.10,192.168.100.11             被动模式 zabbix-server-ip  

     ServerActive=192.168.100.10,192.168.100.11    主动模式  zabbix-server-ip   (谁从我这里采集数据。)  

     Hostname=web1                                         建议使用$HOSTNAME

5、启动zabbix-agent:10050

[root@localhost ~]# systemctl start zabbix-agent

[root@localhost ~]# systemctl enable zabbix-agent

[root@localhost ~]# ss -anlp |grep :10050