1. 下载安装!!!!
[root@localhost ~]# wget https://dl.grafana.com/oss/release/grafana-7.5.6-1.x86_64.rpm
--2021-05-19 00:07:44-- https://dl.grafana.com/oss/release/grafana-7.5.6-1.x86_64.rpm
正在解析主机 dl.grafana.com (dl.grafana.com)... 151.101.198.217, 2a04:4e42:4c::729, 2a04:4e42:4d::729
正在连接 dl.grafana.com (dl.grafana.com)|151.101.198.217|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:51910136 (50M) [application/x-redhat-package-manager]
正在保存至: “grafana-7.5.6-1.x86_64.rpm”
grafana-7.5.6-1.x86_64 100%[=========================>] 49.50M 140KB/s 用时 11m 0s
2021-05-19 00:18:46 (76.8 KB/s) - 已保存 “grafana-7.5.6-1.x86_64.rpm” [51910136/51910136])
[root@localhost ~]# dnf -y install grafana-7.5.6-1.x86_64.rpm
上次元数据过期检查:6:00:49 前,执行于 2021年05月18日 星期二 18时18分29秒。
依赖关系解决。
=========================================================================================
软件包 架构 版本 仓库 大小
=========================================================================================
安装:
grafana x86_64 7.5.6-1 @commandline 50 M
事务概要
=========================================================================================
安装 1 软件包
总计:50 M
安装大小:169 M
下载软件包:
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
准备中 : 1/1
安装 : grafana-7.5.6-1.x86_64 1/1
运行脚本: grafana-7.5.6-1.x86_64 1/1
### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable grafana-server.service
### You can start grafana-server by executing
sudo /bin/systemctl start grafana-server.service
POSTTRANS: Running script
验证 : grafana-7.5.6-1.x86_64 1/1
Installed products updated.
已安装:
grafana-7.5.6-1.x86_64
[root@localhost ~]# service grafana-server start (启动服务!!!!!)
Reloading systemd: [ OK ]
Starting grafana-server (via systemctl): [ OK ]
(添加 zabbix插件!!!!)
[root@localhost ~]# grafana-cli plugins install alexanderzobnin-zabbix-app
installing alexanderzobnin-zabbix-app @ 4.1.5
from: https://grafana.com/api/plugins/alexanderzobnin-zabbix-app/versions/4.1.5/download
into: /var/lib/grafana/plugins
✔ Installed alexanderzobnin-zabbix-app successfully
Restart grafana after installing plugins . <service grafana-server restart>
[root@localhost ~]# service grafana-server start (再次重启服务!!!!)
Reloading systemd: [ OK ]
Starting grafana-server (via systemctl): [ OK ]
[root@localhost ~]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:10050 0.0.0.0:*
LISTEN 0 128 0.0.0.0:10051 0.0.0.0:*
LISTEN 0 128 0.0.0.0:9000 0.0.0.0:*
LISTEN 0 128 0.0.0.0:111 0.0.0.0:*
LISTEN 0 32 192.168.122.1:53 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 5 127.0.0.1:631 0.0.0.0:*
LISTEN 0 128 *:3000 *:*
LISTEN 0 80 *:3306 *:*
LISTEN 0 128 [::]:111 [::]:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 5 [::1]:631 [::]:*
2. 在网页上访问garafana主机的3000端口!!!
2.1 首次登录的帐号默认为 admin 密码为 admin
2.2 在登陆进去之后,会强制要求更改密码!!!
2.3 开启grafana和zabbix连接的插件