Skip to main content
This guide walks through installing a Prometheus server from the official precompiled binaries. It covers downloading the release tarball, extracting it, inspecting the files, validating the configuration with promtool, starting the server, and running a basic PromQL query via the web UI. Prerequisites
  • A machine with network access to download releases (Linux, macOS, or Windows — choose the matching binary).
  • Common CLI tools: wget or curl, tar, and a shell.
  • Ports: Prometheus listens on port 9090 by default. Ensure firewall rules allow access if needed.
Step 1 — Download the Prometheus binary
  • Visit the Prometheus download page to find the correct URL for your OS/architecture: https://prometheus.io/download
  • You can download via browser or copy the tarball link and use wget from the command line. Choose the correct OS/architecture (for example, linux-amd64) and prefer the latest stable release unless you require an older version.
Select the binary matching your operating system and architecture (for example, linux-amd64). Using the latest stable release is recommended unless you need a specific older version.
A screenshot of the Prometheus "Download" webpage showing tables of precompiled binaries and exporters with file names, OS/architecture, sizes and SHA256 checksums. The page header and a sidebar list of exporter links are visible.
Example: copy the link for prometheus-<version>.linux-amd64.tar.gz and download with wget:
After the download completes, verify the tarball exists:
Step 2 — Extract the tarball
  • Extract the gzipped tarball. The -z handles gzip compression, -v prints filenames, and -f specifies the file:
This creates a directory such as prometheus-2.37.2.linux-amd64/. Confirm:
Step 3 — Inspect the extracted files Change into the extracted directory and list the contents. Key items include the server binary, the default configuration, and promtool:
Table: Key files and purpose Validate the configuration before starting Prometheus:
Step 4 — Start Prometheus Start Prometheus from the extracted directory. By default it reads prometheus.yml from the current directory; you can override this with --config.file:
When the server starts correctly you should see logs like:
Do not expose Prometheus directly to the public internet without appropriate access controls (firewalls, reverse proxy with authentication, or network restrictions). Prometheus has no built-in authentication by default.
To run Prometheus continuously in production, create a systemd unit or use your OS service manager. This guide demonstrates the local binary for learning and testing. Step 5 — Access the Web UI and run a basic query
  • Open a browser on the machine running Prometheus and go to: http://localhost:9090 If accessing remotely, use the server IP: http://<prometheus-server-ip>:9090
  • In the Prometheus expression browser, run a simple PromQL query to check target status:
Query:
Example result (Prometheus scraping itself):
A value of 1 indicates the target is up; 0 indicates it is down. Prometheus includes a default job to scrape itself, so the server should appear in the up results immediately after startup. Troubleshooting tips
  • Web UI not reachable:
    • Confirm Prometheus is running and listening on port 9090: ss -ltnp | grep 9090 or netstat -ltnp | grep 9090.
    • Check firewall rules and that you’re using the correct host/IP address.
  • Configuration errors:
    • Fix issues reported by promtool and re-run ./promtool check config prometheus.yml before restarting.
  • Logging and diagnostics:
    • Check the Prometheus process stdout/stderr (if running in the foreground) or journalctl -u prometheus if running as a systemd service.
  • Running as a background service:
    • Use systemd or your OS service manager. See the Prometheus documentation for an example systemd unit and recommended file locations.
Useful links and references Summary You now have a basic Prometheus server installed from a precompiled binary, validated with promtool, running locally, and serving metrics on port 9090. From here you can add scrape targets to prometheus.yml, configure alerting rules, and integrate exporters or Grafana for visualization.

Watch Video