
How to Install and Configure Grafana on Fedora: A Step-by-Step Guide
Unlock the power of your data by installing Grafana, a leading open-source platform for monitoring and observability. Grafana allows you to query, visualize, alert on, and understand your metrics no matter where they are stored. With its beautiful dashboards and powerful data source integrations, it’s an essential tool for system administrators, developers, and data analysts.
This guide will walk you through the complete process of installing and configuring Grafana on a Fedora system. We’ll cover everything from adding the official repository to configuring your firewall and logging in for the first time.
Prerequisites
Before we begin, ensure you have the following:
- A system running a recent version of Fedora.
- Access to a user account with
sudoor root privileges.
Step 1: Add the Official Grafana Repository
Grafana is not included in the default Fedora repositories. To ensure you install the latest stable version and receive future updates, the best practice is to add the official Grafana repository.
Create a new repository file in the /etc/yum.repos.d/ directory using your preferred text editor, such as nano or vi.
sudo nano /etc/yum.repos.d/grafana.repo
Paste the following configuration into the file. This configuration points your system’s package manager to the official Grafana repository, verifies packages with a GPG key for security, and enables the repository.
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
Save the file and exit the text editor.
Step 2: Install Grafana with DNF
With the repository now configured, your system knows where to find the Grafana package. You can install it using the dnf package manager.
Run the following command in your terminal:
sudo dnf install grafana
The system will resolve dependencies and ask for confirmation to install Grafana and any other required packages. Press y and hit Enter to proceed.
Step 3: Start and Enable the Grafana Service
After the installation is complete, you need to start the Grafana server process. You should also enable it to ensure it automatically starts whenever the system reboots.
To start the service for the current session, use the systemctl command:
sudo systemctl start grafana-server
Next, enable the service to launch on boot:
sudo systemctl enable grafana-server
You can verify that the service is running correctly by checking its status:
sudo systemctl status grafana-server
Look for the output line that says Active: active (running), which confirms Grafana is up and running successfully.
Step 4: Configure the Firewall
By default, Grafana listens for connections on port 3000. To access the web interface from other machines, you must open this port in your system’s firewall. Fedora uses firewalld as its default firewall management tool.
Run the following commands to permanently add a rule for port 3000 and reload the firewall to apply the changes:
sudo firewall-cmd --add-port=3000/tcp --permanent
sudo firewall-cmd --reload
The --permanent flag ensures the rule persists across reboots. The reload command applies the new rule without restarting the entire firewall service.
Step 5: Access the Grafana Web Interface
Your Grafana instance is now fully installed, running, and accessible. To log in, open a web browser and navigate to your server’s IP address or hostname, followed by the port number.
http://your-server-ip:3000
You will be greeted with the Grafana login page.
- Default Username:
admin - Default Password:
admin
Security Best Practice: Upon your first login, Grafana will immediately prompt you to change the default password. It is highly recommended that you set a strong, unique password to secure your Grafana instance from unauthorized access.
Congratulations! You have successfully installed and configured Grafana on your Fedora system. You are now ready to add data sources like Prometheus, InfluxDB, or MySQL and start building powerful, insightful dashboards to visualize your data.
Source: https://kifarunix.com/install-grafana-monitoring-tool-on-fedora-29/


