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:
- A Fedora Server Latest distribution with root privileges
- 2GB free memory
- 2GB free disk space
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:
- 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
- Extract the downloaded package by running the command below:
tar -xvf prometheus-2.30.3.linux-amd64.tar.gz
- Move the extracted package to the /opt directory:
sudo mv prometheus-2.30.3.linux-amd64/ /opt/prometheus
- Create a symlink for the Prometheus binary file:
sudo ln -s /opt/prometheus/prometheus /usr/local/bin/prometheus
- Create a new user to run Prometheus:
sudo useradd --no-create-home --shell /bin/false prometheus
- Assign the ownership of the Prometheus directory to the created user:
sudo chown -R prometheus:prometheus /opt/prometheus
- Copy the systemd configuration file to /etc/systemd/system/:
sudo cp /opt/prometheus/examples/prometheus.service /etc/systemd/system/
- Reload the systemd configuration:
sudo systemctl daemon-reload
- Enable the Prometheus service at system startup:
sudo systemctl enable prometheus
- 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.