← Back to list

Step-by-Step Guide to Installing Prometheus on RHEL 8.10

Introduction

Shlpa S Behani in DevOps Playbook · 2025-02-02 12:01 · 0 claps · 2.1 min read paywalled
#prometheus #monitoring #devops #alerting
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud

Step-by-Step Guide to Installing Prometheus on RHEL 8.10

Introduction

Prometheus is an open-source monitoring and alerting toolkit designed for reliability and scalability. In this guide, we’ll walk you through installing Prometheus on RHEL 8.10 and integrating it with Grafana for visualization.

1. Prerequisites

Before installing Prometheus, ensure:

  • You have sudo/root access.
  • Your system is updated.
  • wget and firewalld are installed.

Update the system:

sudo dnf update -y

Install dependencies:

sudo dnf install wget -y

2. Create Prometheus User and Directories

sudo useradd --no-create-home --shell /bin/false prometheus
sudo mkdir -p /etc/prometheus /var/lib/prometheus

Set correct permissions:

sudo chown -R prometheus:prometheus /etc/prometheus /var/lib/prometheus

3. Download and Install Prometheus

Official Prometheus Download Page: Prometheus Releases

Download the latest Prometheus version using wget:

cd /tmp
LATEST_VERSION=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')
wget https://github.com/prometheus/prometheus/releases/download/${LATEST_VERSION}/prometheus-${LATEST_VERSION}.linux-amd64.tar.gz -O prometheus.tar.gz

Extract the tarball:

tar -xvf prometheus.tar.gz
cd prometheus-*.linux-amd64

Move binaries:

sudo mv prometheus promtool /usr/local/bin/

Move configuration files:

sudo mv prometheus.yml /etc/prometheus/
sudo mv consoles console_libraries /etc/prometheus/

Set correct ownership:

sudo chown -R prometheus:prometheus /etc/prometheus /var/lib/prometheus
sudo chown prometheus:prometheus /usr/local/bin/prometheus /usr/local/bin/promtool

4. Configure Prometheus

Edit the Prometheus configuration file:

sudo nano /etc/prometheus/prometheus.yml

Ensure it contains:

global:
  scrape_interval: 15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: "prometheus"
    static_configs:
      - targets: ["localhost:9090"]

5. Create a Systemd Service for Prometheus

sudo nano /etc/systemd/system/prometheus.service

Add the following:

[Unit]
Description=Prometheus Monitoring System
Wants=network-online.target
After=network-online.target

[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/prometheus \
    --config.file=/etc/prometheus/prometheus.yml \
    --storage.tsdb.path=/var/lib/prometheus/ \
    --web.console.templates=/etc/prometheus/consoles \
    --web.console.libraries=/etc/prometheus/console_libraries \
    --web.listen-address="0.0.0.0:9090"

[Install]
WantedBy=multi-user.target

Reload systemd and start Prometheus:

sudo systemctl daemon-reload
sudo systemctl enable --now prometheus

Check the status:

sudo systemctl status prometheus

6. Configure Firewall

Allow Prometheus through the firewall:

sudo firewall-cmd --permanent --add-port=9090/tcp
sudo firewall-cmd --reload

7. Verify Installation

7.1 Verify Prometheus is Running Locally

Run the following command to check if Prometheus is accessible via CLI:

curl -I http://localhost:9090

✅ Expected output:

HTTP/1.1 200 OK

Or check Prometheus health status:

curl http://localhost:9090/-/healthy

✅ Expected output:

Prometheus is Healthy

7.2 Verify Remote Access

From another system, run:

curl -I http://<your-server-ip>:9090

If access is denied, check firewall settings and ensure Prometheus is listening on 0.0.0.0:9090.

8. Integrate Prometheus with Grafana

8.1. Log into Grafana

  1. Open Grafana: http://<your-server-ip>:3000
  2. Default credentials:
  • Username: admin
  • Password: admin (change if needed)

8.2. Add Prometheus as a Data Source

  1. Go to Settings (⚙️) → Data Sources.
  2. Click Add Data Source → Select Prometheus.
  3. Configure:
  1. Click Save & Test.

Expected Output: Data source is working

8.3. Import Grafana Dashboards

  1. Go to Dashboards → Import.
  2. Use these IDs:
  • Node Exporter Full (System Metrics)1860
  • Prometheus 2.0 Stats3662
  1. Select Prometheus as Data Source → Click Import.

🚀 Now, you can visualize Prometheus metrics in Grafana!

Conclusion

Congratulations! You have successfully installed Prometheus on RHEL 8.10 and integrated it with Grafana. 🎯

Let’s Connect and Continue the Learning Journey!

Did you find this blog post helpful? If so, please show your support by:

👏 Clapping: A quick way to let us know you appreciate the content. 👣 Following: Stay updated with our latest insights and best practices. 📩 Subscribing: Receive our latest articles directly to your inbox.

Your feedback and support help us continue to create valuable content. Thank you! 💙😊

Have questions or tips to share? Drop them in the comments below! 💬


메타데이터
post_id
e2f8498a6d1d
slug
step-by-step-guide-to-installing-prometheus-on-rhel-8-10-e2f8498a6d1d
url
https://medium.com/devops-playbook/step-by-step-guide-to-installing-prometheus-on-rhel-8-10-e2f8498a6d1d
canonical_url
https://medium.com/devops-playbook/step-by-step-guide-to-installing-prometheus-on-rhel-8-10-e2f8498a6d1d
author_url
https://medium.com/@shilpa.behani89
status
ok
fetched_at
2026-06-12 22:02:08