rpm -ivh zabbix-release-3.4-2.el7.noarch.rpm
systemctl stop firewalld
setenforce 0

二,[endif]安裝zabbix環(huán)境;
yum -y install zabbix-web-mysql zabbix-agent zabbix-server-mysql mariadb-server
三,啟動(dòng)mysql,進(jìn)入msyql,創(chuàng)建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和數(shù)據(jù)庫的連接;
zcat /usr/share/doc/zabbix-server-mysql-3.4.15/create.sql.gz | mysql -uzabbix -p123456 zabbix
五,修改時(shí)區(qū),并啟動(dòng);
vim /etc/httpd/conf.d/zabbix.conf
systemctl restart httpd
systemctl enable httpd

六,修改zabbix-server配置文件,并啟動(dòng);
vim /etc/zabbix/zabbix_server.conf
DBPassword=123456
systemctl restart zabbix-server
systemctl enable zabbix-server

七,修改zabbix-agent配置文件,并啟動(dòng);
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,并啟動(dòng);
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.4.3-1.x86_64.rpm

安裝依賴
yum install -y urw-fonts
再次安裝啟動(dòng)
rpm -ivh grafana-4.4.3-1.x86_64.rpm

測(cè)試訪問頁面是否成功:
http://192.168.40.111:3000/login

十一,登錄grafana用戶:admin,密碼:admin,下載zabbix插件

grafana-cli plugins install alexanderzobnin-zabbix-app

在啟動(dòng)grafana
systemctl restart grafana-server
再次訪問frafana,并設(shè)置啟動(dòng)zabbix







進(jìn)入zabbix頁面:弄出數(shù)據(jù)(修改監(jiān)控IP)

刷新連接數(shù)據(jù)成功

訪問zabbix數(shù)據(jù)
