zabbix yum安装

时间:2023-03-09 23:39:21
zabbix yum安装

1. 安装zabbix yum源

rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/6/x86_64/zabbix-release-4.0-1.el6.noarch.rpm

yum clean all

2.安装zabbix服务端,前端,代理

yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent

3.创建数据库

# mysql -uroot -p
password
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

4.配置zabbix数据库

vim /etc/zabbix/zabbix_server.conf

DBPassword=password

为zabbix前端配置php

php_value date.timezone Europe/Riga

5.启动zabbix服务器和代理进程

systemctl restart zabbix-server zabbix-agent httpd

systemctl enable zabbix-server zabbix-agent httpd