How to Install Prometheus on Fedora Server Latest

Prometheus is a free and open-source monitoring tool used to collect metrics from various systems, services, and applications. In this tutorial, we will show you how to install Prometheus on Fedora Server.

Prerequisites

Before you begin, make sure the following prerequisites are met:

Step 1 : Update system packages

The first step is to update the system packages to the latest available version. You can do this by running the following command:

sudo dnf update -y

Step 2 : Install and configure Prometheus

Now, we need to install the Prometheus package on our system. You can do this by following the steps below:

  1. Download the latest version of Prometheus by running the following command:
wget https://github.com/prometheus/prometheus/releases/download/v2.30.3/prometheus-2.30.3.linux-amd64.tar.gz
  1. Extract the downloaded package by running the command below:
tar -xvf prometheus-2.30.3.linux-amd64.tar.gz
  1. Move the extracted package to the /opt directory:
sudo mv prometheus-2.30.3.linux-amd64/ /opt/prometheus
  1. Create a symlink for the Prometheus binary file:
sudo ln -s /opt/prometheus/prometheus /usr/local/bin/prometheus
  1. Create a new user to run Prometheus:
sudo useradd --no-create-home --shell /bin/false prometheus
  1. Assign the ownership of the Prometheus directory to the created user:
sudo chown -R prometheus:prometheus /opt/prometheus
  1. Copy the systemd configuration file to /etc/systemd/system/:
sudo cp /opt/prometheus/examples/prometheus.service /etc/systemd/system/
  1. Reload the systemd configuration:
sudo systemctl daemon-reload
  1. Enable the Prometheus service at system startup:
sudo systemctl enable prometheus
  1. Start the Prometheus service:
sudo systemctl start prometheus

Step 3 : Accessing Prometheus

Once Prometheus is installed, you can access the Prometheus web interface by opening a web browser and entering the following URL:

http://<YOUR-SERVER-IP-ADDRESS>:9090

You can now start monitoring your system using Prometheus.

Conclusion

In this tutorial, we have shown you how to install Prometheus on Fedora Server. You can now start collecting and analyzing metrics from your systems, services, and applications.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!