1.安装依赖
yum install gcc libxml2-devel net-snmp net-snmp-devel curl curl-devel php php-bcmath php-mbstring mariadb mariadb-devel –y
2.PHP
vim /etc/php.ini
date.timezone = PRC
3.wget安装包
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
wget https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-proxy-mysql-4.4.5-2.el7.x86_64.rpm
wget https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-agent-4.4.5-2.el7.x86_64.rpm
4.安装包
yum install zabbix-proxy-mysql-4.4.5-2.el7.x86_64.rpm -y
yum install mariadb-server.x86_64 -y
5.配置数据库
systemctl start/enable mariadb
mysqladmin -uroot password <password>
mysql -uroot -p
mysql> create database zabbix_proxy character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix_proxy.* to zabbix_proxy@localhost identified by '<password>';
mysql> quit;
zcat /usr/share/doc/zabbix-proxy-mysql-4.4.5/schema.sql.gz | mysql -u zabbix_proxy -p zabbix_proxy
6.配置conf
vim /etc/zabbix/zabbix_proxy.conf
Server=172.28.11.6
Hostname=O-Zabbix-Proxy01
DBHost=localhost
DBName=zabbix_proxy
DBUser=zabbix_proxy
DBPassword=<password>
configFrequency = 60
systemctl start/enable zabbix-proxy
7.配置agent
vim /etc/zabbix/zabbix_agent.conf
agent被动模式