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以上目前存在类似问题。

相关推荐
上天_去_做颗惺星 EVE_BLUE3 小时前
【新 Linux 服务器上手全攻略】系统巡检、存储规划与开发环境初始化
linux·运维·服务器·ubuntu·macos·centos
成为你的宁宁6 小时前
【Prometheus Operator 监控 K8S集群的Calico 与 Ingress-Nginx 组件】
kubernetes·prometheus
2601_961194026 小时前
考研专业课在哪里参加考试|考点|流程|资料已整理
linux·考研·ubuntu·缓存·centos·负载均衡
Adorable老犀牛7 小时前
Prometheus 常用告警规则 rules.yml
开发语言·prometheus·exporter·nodeexpoeter
Jinkxs16 小时前
Prometheus - 监控微服务:Spring Boot 应用指标暴露与监控
spring boot·微服务·prometheus
我叫张小白。20 小时前
CentOS 7 安装 Docker并配置镜像加速(完整指南)
linux·docker·centos
云烟成雨TD1 天前
Spring AI 1.x 系列【50】可观测性:接入 Prometheus + Grafana
人工智能·spring·prometheus
YDS8291 天前
DeepSeek RAG&MCP + Agent智能体项目 —— 集成ELK日志管理系统和Prometheus监控系统
java·elk·ai·springboot·agent·prometheus·deepseek
暮云星影2 天前
个人总结 搭建Docker监控
docker·容器·grafana·prometheus