> CentOS > CentOS教程 >

zabbix 3.0快速安装简介(centos 7)

zabbix快速安装

系统版本:centos 7

通过yum方法安装Zabbix3.0,安装源为阿里云

yum源配置

1
rpm -ivh http://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

安装

1
yum install zabbix-server zabbix-agent zabbix-web zabbix-get zabbix-server-mysql zabbix-web-mysql mariadb-server mariadb -y

修改PHP时区配置

1
sed -i 's@# php_value date.timezone Europe/Riga@php_value date.timezone Asia/Shanghai@g' /etc/httpd/conf.d/zabbix.conf

启动数据库

1
systemctl start mariadb

创建zabbix数据库及用户

1
2
3
4
5
6
mysql
create database zabbix character set utf8 collate utf8_bin;
grant all on zabbix.* to zabbix@'localhost' identified by 'zabbix';
exit
cd /usr/share/doc/zabbix-server-mysql-3.0.5
zcat create.sql.gz |mysql -uzabbix -pzabbix zabbix

修改zabbix配置

1
2
3
4
5
# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost    #数据库所在主机
DBName=zabbix       #数据库名
DBUser=zabbix       #数据库用户
DBPassword=zabbix   #数据库密码

启动zabbix及http

1
2
systemctl start zabbix-server
systemctl start httpd

web界面配置

http://ip:port/zabbix/setup.php

 

 

用户名Admin 密码zabbix

agent配置

1
2
3
4
vim /etc/zabbix/zabbix_agentd.conf    
Server=192.168.137.11               #用于被动模式,数据获取
ServerActive=192.168.137.11         #用于主动模式,数据提交
systemctl start zabbix-agent       #启动zabbix agent



(责任编辑:IT)