CentOS-7安装grafana

一、通用设置(分别在4台虚拟机设置)

1、配置主机名

hostnamectl set-hostname --static 主机名

2、修改hosts文件

vim /etc/hosts
输入:
192.168.15.129 master
192.168.15.133 node1
192.168.15.134 node2
192.168.15.136 node3

3、 保持服务器之间时间同步

yum install -y  ntpdate && ntpdate time.windows.com

4、关闭防火墙(生产上不要这样操作、重启虚拟机后需重新操作)

systemctl stop firewalld 
systemctl disable firewalld 
iptables -F

二、在node2节点安装Grafana

1、打开3000端口的防火墙

vi /etc/sysconfig/iptables

在这里插入图片描述

2、重启防火墙

systemctl restart [iptables.service](http://iptables.service)

3、防火墙开机启动

systemctl enable [iptables.service](http://iptables.service)

因为在测试,直接iptables -F

4、进入/usr/local目录

cd /usr/local

5、下载安装包

wgethttps://dl.grafana.com/enterprise/release/grafana-enterprise-9.4.1-1.x86_64.rpm

6、安装

sudo yum install grafana-enterprise-9.4.1-1.x86_64.rpm

7、granafa默认使用3000端口,启动前查看3000端口是否占用

netstat -anp | grep 3000 或ss -ntlp | grep grafana

8、如果被占用,kill该进程 (生产环境不要这样操作,换个端口启动)

kill -9 4028

9、再次查看,确认kill成功

netstat -anp | grep 3000

10、启动服务

systemctl restart grafana-server

11、设置服务开机启动

systemctl enable grafana-server

12、访问

http://192.168.15.134:3000/d/aka/node-exporter-dashboard-220413-consulmanager?orgId=1

在这里插入图片描述

相关推荐

  1. centos7安装rabbitMQ

    2024-04-24 09:50:02       65 阅读
  2. CentOS 7 安装 Nginx

    2024-04-24 09:50:02       59 阅读
  3. CentOS 7 安装 Nginx

    2024-04-24 09:50:02       50 阅读
  4. CentOS7安装Docker

    2024-04-24 09:50:02       60 阅读
  5. Centos7安装django

    2024-04-24 09:50:02       48 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-24 09:50:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-24 09:50:02       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-24 09:50:02       82 阅读
  4. Python语言-面向对象

    2024-04-24 09:50:02       91 阅读

热门阅读

  1. css设置子元素在父元素中水平垂直居中

    2024-04-24 09:50:02       35 阅读
  2. [网络编程]socket嵌套字的一些常用接口

    2024-04-24 09:50:02       29 阅读
  3. equals和==有什么区别?

    2024-04-24 09:50:02       39 阅读