关闭防火墙和selinux
wget https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm
rpm -ivh zabbix-release-4.0-2.el7.noarch.rpm
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get
yum -y install mariadb mariadb-server
修改vim /etc/my.cnf
加入character-set-server=utf8
登录数据库,创建zabbix数据库
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
把表导入数据库
[root@zabbix ~]# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -pzabbix zabbix;