zabbix快速安装
系统版本:centos 7
通过yum方法安装Zabbix3.0,安装源为阿里云
yum源配置
rpm -ivh http://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
安装
yum install zabbix-server zabbix-agent zabbix-web zabbix-get zabbix-server-mysql zabbix-web-mysql mariadb-server mariadb -y
修改PHP时区配置
sed -i 's@# php_value date.timezone Europe/Riga@php_value date.timezone Asia/Shanghai@g' /etc/httpd/conf.d/zabbix.conf
启动数据库
systemctl start mariadb
创建zabbix数据库及用户
mysqlcreate database zabbix character set utf8 collate utf8_bin;grant all on zabbix.* to zabbix@'localhost' identified by 'zabbix';exitcd /usr/share/doc/zabbix-server-mysql-3.0.5zcat create.sql.gz |mysql -uzabbix -pzabbix zabbix
修改zabbix配置
# vim /etc/zabbix/zabbix_server.confDBHost=localhost #数据库所在主机DBName=zabbix #数据库名 DBUser=zabbix #数据库用户 DBPassword=zabbix #数据库密码
启动zabbix及http
systemctl start zabbix-serversystemctl start httpd
web界面配置
http://ip:port/zabbix/setup.php
用户名Admin 密码zabbix
agent配置
vim /etc/zabbix/zabbix_agentd.conf Server=192.168.137.11 #用于被动模式,数据获取ServerActive=192.168.137.11 #用于主动模式,数据提交systemctl start zabbix-agent #启动zabbix agent