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 ...
    • 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, ...
    • Can link failover when signal is poor?

      Yes, you need to install lm-csq.rpk. When CSQ is lower than the set threshold, the link will be switched.
    • Can I activate the RCMS App via SMS?

      A: Yes, for devices already in the field it is possible to install and activate the RCMS App remotely using SMS
    • Is Docker installed on my device by default?

      A: No, but it will be automatically installed when the Container Monitoring App is installed. You don't need to install it manually.