rpm -ivh zabbix-release-3.4-2.el7.noarch.rpm
systemctl stop firewalld
setenforce 0
二,[endif]安装zabbix环境;
yum -y install zabbix-web-mysql zabbix-agent zabbix-server-mysql mariadb-server
三,启动mysql,进入msyql,创建zabbix库,和用户以及密码;
systemctl restart mariadb
systemctl enable mariadb
Mysql
create database zabbix charset utf8;
grant all on zabbix.* to zabbix@'localhost' identified by '123456';
flush privileges;
Exit;
四,建立zabbix和数据库的连接;
zcat /usr/share/doc/zabbix-server-mysql-3.4.15/create.sql.gz | mysql -uzabbix -p123456 zabbix
五,修改时区,并启动;
vim /etc/httpd/conf.d/zabbix.conf
systemctl restart httpd
systemctl enable httpd
六,修改zabbix-server配置文件,并启动;
vim /etc/zabbix/zabbix_server.conf
DBPassword=123456
systemctl restart zabbix-server
systemctl enable zabbix-server
七,修改zabbix-agent配置文件,并启动;
vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.40.111
#ServerActive=127.0.0.1
systemctl restart zabbix-agent
systemctl enable zabbix-agent
八,访问页面:
http://192.168.40.111/zabbix
九,安装grafana,并启动;
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.4.3-1.x86_64.rpm
安装依赖
yum install -y urw-fonts
再次安装启动
rpm -ivh grafana-4.4.3-1.x86_64.rpm
测试访问页面是否成功:
http://192.168.40.111:3000/login
十一,登录grafana用户:admin,密码:admin,下载zabbix插件
grafana-cli plugins install alexanderzobnin-zabbix-app
在启动grafana
systemctl restart grafana-server
再次访问frafana,并设置启动zabbix
进入zabbix页面:弄出数据(修改监控IP)
刷新连接数据成功
访问zabbix数据