Here is how to install Prometheus on Ubuntu 24.04 LTS. Tested and verified.
Prerequisites
- Ubuntu 24.04 LTS installed and updated
- Root or sudo access
- Internet connection
Step 1: Update System
sudo apt update && sudo apt upgrade -yStep 2: Add Official Repository
Prometheus should be installed from the official repository to get the latest stable version and security updates.
# Add the official Prometheus repository
# Check Prometheus documentation for the latest repo URL
sudo apt install -y curl gnupg2Step 3: Install Prometheus
sudo apt install -y prometheusStep 4: Verify Installation
prometheus versionExpected output should show the installed version.
Step 5: Post-Install Configuration
# Enable and start the service (if applicable)
sudo systemctl enable --now prometheus
# Verify status
sudo systemctl status prometheusTroubleshooting
Package Not Found
Make sure the repository was added correctly:
# List configured repositories
apt repolistPermission Denied
Ensure your user has the correct group membership:
sudo usermod -aG prometheus $USER
newgrp prometheusUninstall
sudo apt remove -y prometheusRelated Guides
About the Author
I am Luca Berton, AI and Cloud Advisor. Book a consultation to get help with your infrastructure setup.