In this post, I’ll walk you through the installation of Grafana 8 on Ubuntu / Debian. Grafana v7 is out and it can be installed on Ubuntu, Debian and Red Hat based Linux distributions.

install grafana 6 ubuntu 18.04

Grafana is an open source tool which allows you to query, visualize, alert on and understand your metrics no matter where they are stored. It enables you to easily create, explore, and share dashboards with your team and foster a data-driven culture.

What is new in Grafana 8.0?

  • Library panels: Allow users to build panels that can be used in multiple dashboards
  • Prometheus metrics browser: Allows you to quickly find metrics and select relevant labels to build basic queries.
  • Grafana v8.0 alerts: Centralizes alerting information for Grafana managed alerts and alerts from Prometheus-compatible data sources in one UI and API.
  • Real-time streaming: Data sources can now send real-time updates to dashboards over a websocket connection
  • Bar chart visualization: A new visualization that supports categorical data
  • Histogram visualization: This hidden feature of the old Graph panel is now a standalone visualization
  • State timeline visualization: The State timeline visualization shows discrete state changes over time
  • Time series visualization out of Beta and is now graduating to a stable state
  • Download logs: When you inspect a panel, you can now download log results as a text (.txt) file.

For CentOS 7, check: How to Install Grafana on CentOS 7

Step 1: Update system

Ensure your Ubuntu / Debian system is up to date.

sudo apt-get update
sudo apt-get upgrade
sudo reboot

Step 2: Add Grafana 8 APT repository

Add Grafana gpg key which allows you to install signed packages.

sudo apt-get install -y gnupg2 curl
curl https://packages.grafana.com/gpg.key | sudo apt-key add -

Then install Grafana 8 APT repository:

sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"

If your system is missing , check How to Install add-apt-repository on Debian / Ubuntu

Once the repository is added, proceed to update your Apt repositories and install Grafana 8 on Ubuntu / Debian.

sudo apt-get update
sudo apt-get -y install grafana

Start grafana service.

sudo systemctl start grafana-server

The grafana-service should now be running.

$ systemctl status grafana-server
grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; disabled; vendor preset: enabled)
Active: active (running) since Thu 2019-04-18 10:49:09 PDT; 1min 38s ago
Docs: http://docs.grafana.org
Main PID: 4064 (grafana-server)
Tasks: 10 (limit: 1110)
CGroup: /system.slice/grafana-server.service
`-4064 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=deb cfg:defa
Apr 18 10:49:15 ubuntu-01 grafana-server[4064]: t=2019-04-18T10:49:15-0700 lvl=info msg="Initializing RemoteCache" logger=server
Apr 18 10:49:15 ubuntu-01 grafana-server[4064]: t=2019-04-18T10:49:15-0700 lvl=info msg="Initializing ServerLockService" logger=server
Apr 18 10:49:15 ubuntu-01 grafana-server[4064]: t=2019-04-18T10:49:15-0700 lvl=info msg="Initializing TracingService" logger=server
Apr 18 10:49:15 ubuntu-01 grafana-server[4064]: t=2019-04-18T10:49:15-0700 lvl=info msg="Initializing UsageStatsService" logger=server
Apr 18 10:49:15 ubuntu-01 grafana-server[4064]: t=2019-04-18T10:49:15-0700 lvl=info msg="Initializing UserAuthTokenService" logger=server
Apr 18 10:49:15 ubuntu-01 grafana-server[4064]: t=2019-04-18T10:49:15-0700 lvl=info msg="Initializing CleanUpService" logger=server
Apr 18 10:49:15 ubuntu-01 grafana-server[4064]: t=2019-04-18T10:49:15-0700 lvl=info msg="Initializing NotificationService" logger=server
Apr 18 10:49:15 ubuntu-01 grafana-server[4064]: t=2019-04-18T10:49:15-0700 lvl=info msg="Initializing ProvisioningService" logger=server
Apr 18 10:49:15 ubuntu-01 grafana-server[4064]: t=2019-04-18T10:49:15-0700 lvl=info msg="Initializing Stream Manager"
Apr 18 10:49:15 ubuntu-01 grafana-server[4064]: t=2019-04-18T10:49:15-0700 lvl=info msg="HTTP Server Listen" logger=http.server address=0.0.0.0:300

Ensure the service is set to run on boot.

sudo systemctl enable grafana-server

Step 3: Access Grafana 6 UI on Debian / Ubuntu

Once the service has been started, you can access its web dashboard by visiting the server IP on port 3000.

If you have an active firewall, mostly ufw, allow port 3000 on the firewall.

sudo ufw allow proto tcp from any to any port 3000

Now open your browser and enter server IP address and port 3000.

install grafana 6 ubuntu 18 01

Default logins are:

Username: admin
Password: admin

But you’re required to change immediately after authenticating.

install grafana 6 ubuntu 18 02

Grafana Package details:

  • Installs binary to /usr/sbin/grafana-server
  • Installs Init.d script to /etc/init.d/grafana-server
  • Creates default file (environment vars) to /etc/default/grafana-server
  • Installs configuration file to /etc/grafana/grafana.ini
  • Installs systemd service (if systemd is available) name grafana-server.service
  • The default configuration sets the log file at /var/log/grafana/grafana.log
  • The default configuration specifies a sqlite3 db at /var/lib/grafana/grafana.db
  • Installs HTML/JS/CSS and other Grafana files at /usr/share/grafana

The systemd service file and init.d script both use environment vars on the file located at /etc/default/grafana-server.

Next steps include looking at Adding data sources

Step 4: Monitoring with Grafana

See our sample guides on how you can monitor your infrastructure using Grafana.

Monitor Linux System with Grafana and Telegraf

Monitoring Ceph Cluster with Prometheus and Grafana

How to Monitor BIND DNS server with Prometheus and Grafana

Monitoring MySQL / MariaDB with Prometheus in five minutes

How to Monitor Apache Web Server with Prometheus and Grafana in 5 minutes

How to Monitor Linux Server Performance with Prometheus and Grafana in 5 minutes

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

LEAVE A REPLY

Please enter your comment!
Please enter your name here