How to Install Grafana on Debian 11

How to Install Grafana on Debian 11

To install Grafana on Debian 11, follow the steps below. Grafana provides its own APT repository for Debian-based distributions, which ensures you get the latest version. This guide will show you how to install Grafana from the official repository.

Step-by-Step Guide to Installing Grafana on Debian 11

Step 1: Update Your System
As always, it's a good idea to ensure that your system is up to date before installing any new software.
sudo apt update
sudo apt upgrade
Step 2: Install Required Dependencies
Install necessary packages for adding repositories over HTTPS:
sudo apt install -y apt-transport-https software-properties-common wget
Step 3: Add the Grafana GPG Key
Download and add the Grafana GPG key, which will allow you to verify the authenticity of the Grafana package:
wget -q -O - https://packages.grafana.com/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/grafana-archive-keyring.gpg
Step 4: Add the Grafana APT Repository
Now, add the Grafana repository to your system’s sources list:
echo "deb [signed-by=/usr/share/keyrings/grafana-archive-keyring.gpg] https://packages.grafana.com/oss/deb stable main" | sudo tee /etc/apt/sources.list.d/grafana.list > /dev/null
Step 5: Update the APT Package List
Update your package index to include the Grafana repository:
sudo apt update
Step 6: Install Grafana
Now, install the Grafana package:
sudo apt install grafana
Step 7: Start and Enable the Grafana Service
Once Grafana is installed, you need to start its service and enable it to automatically start on boot:
sudo systemctl start grafana-server
sudo systemctl enable grafana-server

You can verify that Grafana is running by checking its status:

sudo systemctl status grafana-server
Step 8: Configure Firewall (Optional)
If you are running a firewall on your server, you will need to allow traffic on Grafana's default port (3000). For UFW (Uncomplicated Firewall), you can do this with the following command:
sudo ufw allow 3000/tcp
Step 9: Access the Grafana Web Interface
Once Grafana is running, you can access it via your web browser. Open your browser and navigate to:
http://<your-server-ip>:3000
  1. The default username is admin.
  2. The default password is also admin.
  3. After the first login, Grafana will prompt you to change the default password.
Optional: Install Grafana Plugins
Grafana supports a variety of plugins for data visualization. You can install plugins by using the following command:
sudo grafana-cli plugins install <plugin-name>

After installing a plugin, restart the Grafana service:

sudo systemctl restart grafana-server

Conclusion

You now have Grafana installed and running on Debian 11. From here, you can start configuring data sources, creating dashboards, and visualizing your data.



    • Related Articles

    • How to Install Docker for 2.45

      Note: This method is applicable to EG series/RobustOS Pro devices. Install curl and get Docker GPG key sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL ...
    • How to Install Telit deviceWISE Asset Gateway on Robustel EG Series Gateways?

      Overview This guide provides step-by-step instructions for installing the Telit deviceWISE Asset Gateway software on a Robustel EG series gateway (e.g., EG5120). This installation allows you to leverage the powerful edge computing and Industrial IoT ...
    • How to Install an App(ROS System)

      Oveview This document provides step-by-step instructions for installing applications on your Robustel gateway through the App Center interface. The App Center allows you to extend device functionality by installing additional applications for ...
    • How to install the MQTT broker service on EG series devices?

      Overview This article provides a step-by-step guide for installing and configuring the Mosquitto MQTT broker on a Robustel EG series gateway (e.g., EG5120, EG5200) running RobustOS Pro. This setup is ideal for scenarios where you need a reliable, ...
    • RobustOS Pro SDK

      Robustel's router allows 3rd party to develop their applications. We provide a Software Development Kit (SDK), which offers a simple and fast way to implement customer-specific functions and applications. This SDK is compatible with EG5100, LG5100, ...