为什么需要安装zabbix proxy?
因为zabbix server性能羸弱,无法支撑太多的server和item。因为加入一个proxy减轻server的压力
安装
- 先安装mariadb
yum install -y mariadb-server mariadb systemctl start mariadb.service systemctl enable mariadb.service mysql_secure_installation
- 创建zabbix_proxy数据库
mysql -uroot-pmysql> create database zabbix_proxy character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix_proxy.* to zabbix@localhost identified by 'zabbix'; mysql> quit;
- 安装zabbix-proxy-mysql并导入数据库
yum install https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm yum install -y zabbix-proxy-mysql zcat /usr/share/doc/zabbix-proxy-mysql*/schema.sql.gz | mysql -uzabbix-p zabbix_proxy
- 配置/etc/zabbix/zabbix_proxy.conf
Server=************ Hostname=zabbix_proxy DBName=zabbix_proxy DBUser=zabbix DBPassword=zabbix
- 到zabbix server webui上添加proxy(agent代理名称必须跟/etc/zabbix/zabbix_proxy.conf中配置hostname一致)