两台 虚拟机
一台服务端 一台客户端都要下载zabbix源:
两台虚拟机都要下载
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
把zabbix源移动到/etc/yum.repos.d/
服务端:
yum -y install mariadb mariadb-server
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
启动 mariadb
systemctl start mariadb
进入 mysql
create database zabbix charset utf8 collate utf8_bin;
grant all on zabbix.* to zabbix@'localhost' identified by '123';
exit
导入初始的数据:
zcat /usr/share/doc/zabbix-server-mysql-4.2.8/create.sql.gz | mysql zabbix
vim /etc/zabbix/zabbix_server.conf
DBHost=localhost #91行去掉前面的#号
DBName=zabbix #100行
DBUser=zabbix #116行
DBPassword=123 #124行 mysql里面设置的密码
DBPort