Centos 从0搭建grafana和Prometheus 服务以及问题解决

下载

虚拟机下载

https://customerconnect.vmware.com/en/downloads/info/slug/desktop_end_user_computing/vmware_workstation_player/17_0

cenos 镜像下载

https://www.centos.org/download/

grafana 服务下载

https://grafana.com/grafana/download/7.4.0?platform=linux

Prometheus 服务下载

https://prometheus.io/download/

命令

grafana安装

bash 复制代码
sudo yum install -y https://dl.grafana.com/enterprise/release/grafana-enterprise-7.2.0-1.x86_64.rpm

grafana 启动

bash 复制代码
sudo systemctl start grafana-server -- 启动服务
sudo systemctl stop grafana-server -- 停止服务
sudo systemctl status grafana-server -- 查看状态

prometheus 安装

bash 复制代码
wget https://github.com/prometheus/prometheus/releases/download/v2.30.3/prometheus-2.30.3.linux-amd64.tar.gz

 tar -xzf prometheus-2.30.3.linux-amd64.tar.gz 

prometheus 启动

找到解压目录

执行 ./prometheus

结果如图

虚拟机浏览器访问


搭建遇到问题

主机浏览器访问

这个一般通过 虚拟机ip 替换localhost 即可 加入你不可以 有几种情况

  • 一是你虚拟机不是桥接模式
  • 二可能你防火墙设置了

针对第二种你可以 通过命令关掉防火墙 (开发环境可以这样)

bash 复制代码
systemctl stop firewalld

grafana web 访问失败

出现如图所示的问题加入你符合他说的那几个情况 可以修改配置去调整,假如就是第一次按照没有代理没有docker ,直接安装的 在linux centos 环境中 那个就是版本问题。你需要按照低版本 目前我用7开头的版本实验是可以的。8以上目前存在类似问题。

相关推荐
tianyuanwo17 小时前
CentOS 7 使用 CentOS 8 YUM 源报错 “Invalid version flag: if” 深度解析
python·centos·yum
Elastic 中国社区官方博客1 天前
使用 Observability Migration Platform 将 Datadog 和 Grafana 的仪表板与告警迁移到 Kibana
大数据·elasticsearch·搜索引擎·信息可视化·全文检索·grafana·datalog
sitellla1 天前
Grafana Loki 入门:高效日志聚合系统
其他·grafana
乌托邦的逃亡者1 天前
CentOS/Openeuler主机中,为一个网卡设置多个IP地址
linux·运维·网络·tcp/ip·centos
日取其半万世不竭2 天前
用 Netdata 实时监控服务器,比 Prometheus + Grafana 轻量得多
linux·服务器·网络·系统架构·负载均衡·zabbix·grafana
杨云龙UP2 天前
Oracle数据库启动失败:ORA-29701、ORA-01565、ORA-17503故障处理记录_20260429
linux·运维·数据库·oracle·centos
IT WorryFree2 天前
FGT-KVM 完整部署极简教程(CentOS 7 + KVM 环境)
linux·运维·centos
中国lanwp2 天前
CentOS 7 搭建 NFS Server 服务端 + 客户端 完整一键配置
linux·运维·centos
idolao2 天前
CentOS 7 安装 xampp-linux-1.8.1.tar.gz 详细步骤(解压、启动、验证)
linux·运维·centos
杨云龙UP2 天前
Docker 部署 MongoDB 6.0 数据库每日自动备份实践:本地 + 异地保留 7 天_20260429
linux·运维·数据库·mongodb·docker·容器·centos