准备工作:
centos 7.4
zabbix3.4.6
Database:MariaDB

关闭防火墙:
systemctl stop firewalld

防火墙开机不自启:
systemctl disable firewalld

关闭selinux:
临时:setenforce 0
永久:sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

开始安装数据库:
yum -y install mariadb-server mariadb
启动和开机自启数据库
systemctl start mariadb && systemctl enable mariadb

安装zabbix
rpm -i http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm

yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get zabbix-sender

创建数据库:
mysql -uroot
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix. to zabbix@localhost identified by 'zabbix';
MariaDB [(none)]> quit
导入初始模式和数据
zcat /usr/share/doc/zabbix-server-mysql
/create.sql.gz | mysql -uzabbix -p zabbix

为Zabbix服务器配置数据库
zabbix搭建记录 zabbix3.4.6_第1张图片
启动Zabbix服务器和代理进程,并在系统启动时启动
systemctl start zabbix-server zabbix-agent httpd && systemctl enable zabbix-server zabbix-agent httpd

为Zabbix前端配置PHP,更改时区
vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai

重启系统
reboot

登录http://your server ip/zabbix/ 下一步开始设置即可