Install Grafana on Ubuntu / Rocky Linux & Fedora

Grafana logo

Grafana is an open-source Analytics software with visualization. It provides you with tools to turn your time series database data into insightful graphs and visualizations.

Grafana supports multiple data sources like Prometheus, Graphite, InfluxDB, Elasticsearch, Zabbix, etc…

This tutorial will be helpful for beginners to install Grafana on Ubuntu 20.04 LTS, Rocky Linux 8, AlmaLinux 8, and Fedora 35.

Prerequisites

  • Root priviliges
  • Operating system
  • Recommended CPU – 1
  • Recommended Memory – 255 MB
  • Firefox (or) Chrome (or) Chromium required

Install Grafana on Ubuntu

Step 1: Make sure the system is up to date

sudo apt update -y && sudo apt upgrade -y

Step 2: Install the required dependencies

sudo apt install apt-transport-https wget curl software-properties-common

Step 3: Download the Grafana Key

wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -

Step 4: Add the Grafana repository

echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list

Step 5: Update the repository

sudo apt update

Step 6: Install Grafana

sudo apt install grafana

Step 7: Start the Grafana service and enable autostart

The below commands start the Grafana-server process as the grafana user, and the user id grafana was created during the installation.

sudo systemctl daemon-reload

sudo systemctl start grafana-server

sudo systemctl status grafana-server

sudo systemctl enable grafana-server.service

Step 8: Access Grafana Dashboard

You can access the Grafana dashboard using the server IP or hostname from the browser with the port 3000

http://localhost:3000
(or)
http://SERVER_IP:3000
Grafana Dashboard

Provide the user id as admin and password as admin.

After successful login, it will prompt you to change the password, After successful password change login to the grafana with the new password to access the dashboard.

Grafana login page

Install Grafana on Rocky Linux / AlmaLinux / Fedora

Step 1: Create a Grafana Repo and add the below data to the repo file

sudo nano /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key

Step 2: Update the repo

sudo dnf update -y

Step 3: Install Grafana on AlmaLinux / RockyLinux & Fedora

dnf install grafana -y

Step 4: Start the Grafana services and enable the autostart

sudo systemctl daemon-reload

sudo systemctl start grafana-server

sudo systemctl status grafana-server

sudo systemctl enable grafana-server

Step 5: Access Grafana Dashboard in Rocky Linux / Fedora

You can access the Grafana dashboard using the server IP or hostname from the browser with the port 3000

http://localhost:3000 (or) http://SERVER_IP:3000

Conclusion

From this tutorial, you have learned how to download and install grafana on Ubuntu 20.04 LTS, Rocky Linux 8, Almalinux 8, and Fedora 35

Do let us know your comments and feedback in the comments section below.

If my articles on TipsonUNIX have helped you, kindly consider buying me a coffee as a token of appreciation.

Buy Tipsonunix a Coffee

Thank You for your support!!

Leave a Reply

Secured By miniOrange