Zabbix官网地址:https://www.zabbix.com/download
1.服务端
1.操作前安装好Mysql数据库
- 配置yum源,安装部署Zabbix
rpm -i http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
- 设置数据库
mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
mysql> quit;
- 导入初始化数据库
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
- 为前端配置PHP
Edit file /etc/httpd/conf.d/zabbix.conf, uncomment and set the right timezone for you.
# php_value date.timezone Europe/Riga
- 启动Zabbix服务,并设置开机启动。
systemctl restart zabbix-server zabbix-agent httpd
systemctl enable zabbix-server zabbix-agent httpd
2.客户端
- 配置yum源,安装Zabbix-agent客户端
rpm -i http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-agent
- 修改配置 vim /etc/zabbix/zabbix_agentd.conf 添加ServerIP
Server=192.168.220.10
ServerActive=192.168.220.10
- 设置主机名
Hostname=Vm01