Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.14 KB

5.11-安装zabbix.md

File metadata and controls

39 lines (25 loc) · 1.14 KB

zabbix 官网 https://www.zabbix.com/

zabbix4.0 安装

1)安装zabbix yum源
    rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

2)yum 安装
yum install zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql

3)数据库操作

create database zabbix;
grant all on zabbix.* to 'zabbix'@'127.0.0.1' identified by 'zabbix-pa';

4) 导入数据
/usr/share/doc/zabbix-server-mysql-4.0.3/create.sql.gz 
gzip -d /usr/share/doc/zabbix-server-mysql-4.0.3/create.sql.gz |mysql -uroot -paminglinux zabbix

5) 编辑zabbix_server.conf
vi /etc/zabbix/zabbix_server.conf # 定义数据库相关的参数
systemctl start zabbix-server
systemctl enable zabbix-server

6)zabbix_agent.conf
vi /etc/zabbix/zabbix_agentd.conf #定义Server=127.0.0.1和 ServerActive=127.0.0.1
systemctl start zabbix-agent
systemctl enable zabbix-agent

7)httpd
systemctl start httpd # 如果已经启动了nginx,需要先把nginx关闭,然后启动httpd

8)webui配置
http://ip/zabbix 访问,解决php的问题 (date.timezone Asia/Shanghai) /etc/php.ini
默认密码  admin  zabbix