Installing Prometheus on Linux via Binary and Docker
This guide explains how to install Prometheus on a Linux server using both the binary method and a Docker container, covering downloading, extracting, configuring the prometheus.yml file, running the service, and verifying the installation.
Prometheus is an open‑source monitoring and alerting system originally inspired by Google’s Borgmon; it became a Cloud Native Computing Foundation project in 2016 and is widely used for infrastructure observability.
Binary installation – Download the tarball, extract it, copy the binaries to /usr/local/bin/ , back up the default prometheus.yml , create /etc/prometheus , place the configuration file there, validate it with promtool check config /etc/prometheus/prometheus.yml , and start Prometheus with prometheus --config.file "/etc/prometheus/prometheus.yml" . Use ps -ef | grep prometheus to confirm the process and reload the configuration with kill -HUP <pid> .
Docker installation – On a second host, install Docker, copy the prometheus.yml to /tmp/ , then run the official image: docker run -d -p 9090:9090 -v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus . Verify the container is running with docker ps -a and restart it if necessary using docker restart <container_id> .
Both methods complete the Prometheus setup; after installation, you can access the UI at http:// :9090 and continue with cluster‑wide deployment in future updates.
Practical DevOps Architecture
Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.