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

相关推荐
物联网老王5 小时前
Ubuntu Linux Cursor 安装与使用一
linux·运维·ubuntu
一位摩羯座DBA7 小时前
Redhat&Centos挂载镜像
linux·运维·centos
学习3人组7 小时前
CentOS配置网络
linux·网络·centos
weixin_307779137 小时前
Hive集群之间迁移的Linux Shell脚本
大数据·linux·hive·bash·迁移学习
漫步企鹅8 小时前
【蓝牙】Linux Qt4查看已经配对的蓝牙信息
linux·qt·蓝牙·配对
cui_win8 小时前
【网络】Linux 内核优化实战 - net.core.flow_limit_table_len
linux·运维·网络
梦在深巷、8 小时前
MySQL/MariaDB数据库主从复制之基于二进制日志的方式
linux·数据库·mysql·mariadb
冰橙子id9 小时前
linux系统安全
linux·安全·系统安全
stark张宇9 小时前
VMware 虚拟机装 Linux Centos 7.9 保姆级教程(附资源包)
linux·后端
Johny_Zhao9 小时前
Ubuntu系统安装部署Pandawiki智能知识库
linux·mysql·网络安全·信息安全·云计算·shell·yum源·系统运维·itsm·pandawiki