How to install Grafana 5.0.3 on Linux Mint 18.3

To install Grafana 5.0.3 on Linux Mint 18.3

Grafana is open source data visualization and tracking suite. It supports databases such as Graphite, Elasticsearch, Included, Prometheus etc. The application has a metric analytics, with the capability to control and create your own dashboard to your own apps or infrastructure performance monitoring. This article covers the method to install Grafana on Linux Mint &ndash 18.3.

Installing Grafana

First, before you begin the installation process you need to update the system repository by making use of the following command.

linuxhelp user # apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease                                                           
Get:2 http://archive.canonical.com/ubuntu xenial InRelease [11.5 kB]                                              
Ign:3 http://packages.linuxmint.com sylvia InRelease                                                              
Hit:4 http://packages.linuxmint.com sylvia Release                                            
Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:7 http://archive.canonical.com/ubuntu xenial/partner amd64 Packages [3,132 B]  
Get:8 http://archive.canonical.com/ubuntu xenial/partner i386 Packages [3,124 B]
.
.
Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [242 kB]                           
Get:25 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.2 kB]                        
Get:26 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse i386 Packages [15.3 kB]                         
Get:27 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7,080 B]                        
Get:28 http://archive.ubuntu.com/ubuntu xenial-backports/universe i386 Packages [7,064 B]                         
Get:29 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3,812 B]                        
Fetched 5,323 kB in 42s (126 kB/s)                                                                                
Reading package lists... Done

And then you need to add new Grafana repository.

 linuxhelp user # echo ' deb https://packagecloud.io/grafana/stable/debian/ jessie main'  >  /etc/apt/sources.list.d/grafana.list

Once it is done, you need to add the repository gpg key.

linuxhelp user # curl https://packagecloud.io/gpg.key | apt-key add -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3889  100  3889    0     0   2478      0  0:00:01  0:00:01 --:--:--  2478
OK

And then you need to update the system repository.

linuxhelp user # apt-get update
Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease                                        
Ign:3 http://packages.linuxmint.com sylvia InRelease                                           
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease   
Hit:5 http://packages.linuxmint.com sylvia Release                      
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [742 kB]
Get:10 https://packagecloud.io/grafana/stable/debian jessie InRelease [23.2 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [689 kB]
Get:12 https://packagecloud.io/grafana/stable/debian jessie/main amd64 Packages [5,913 B]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [600 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [555 kB]
Fetched 2,819 kB in 5s (486 kB/s)
Reading package lists... Done

You shall now proceed with the installation of Grafana by making use of the following command.

linuxhelp user # apt-get install grafana -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  grafana
0 upgraded, 1 newly installed, 0 to remove and 280 not upgraded.
Need to get 51.7 MB of archives.
After this operation, 156 MB of additional disk space will be used.
Get:1 https://packagecloud.io/grafana/stable/debian jessie/main amd64 grafana amd64 5.0.3 [51.7 MB]
Fetched 51.7 MB in 56s (922 kB/s)                                                                                 
Selecting previously unselected package grafana.
(Reading database ... 219622 files and directories currently installed.)
Preparing to unpack .../grafana_5.0.3_amd64.deb ...
Unpacking grafana (5.0.3) ...
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up grafana (5.0.3) ...
Adding system user `grafana'  (UID 123) ...
Adding new user `grafana'  (UID 123) with group `grafana'  ...
Not creating home directory `/usr/share/grafana' .
### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd
 sudo /bin/systemctl daemon-reload
 sudo /bin/systemctl enable grafana-server
### You can start grafana-server by executing
 sudo /bin/systemctl start grafana-server
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...

Once it is done, you need to reload your daemon by making use of the following command.

linuxhelp user # systemctl daemon-reload

Now, you should start grafana service.

linuxhelp user # systemctl start grafana-server

And then enable Grafana service by running the following command.

linuxhelp user # systemctl enable grafana-server
Synchronizing state of grafana-server.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable grafana-server
Created symlink from /etc/systemd/system/multi-user.target.wants/grafana-server.service to /usr/lib/systemd/system/grafana-server.service.

After the above step, you shall open your browser give http://IPandportnumber as your URL. The login page of Grafana appears on your screen. Enter your username and password both as admin and click the Log in button.

The Grafana application now appears on your screen.

You shall see the installed version of Grafana

This tutorial comes to an end with this.

Comment
ipaulocesar
Dec 14 2018
How do I do the uninstallation? Como eu faço para fazer a desinstalação ?
Add a comment
FAQ
Q
How to Install Grafana on CentOS?
A
Runt the following command:

# yum install grafana
Q
How do I use the second y axis? secondYAxis function does not work
A
You can switch any series to the second y axis by clicking on the colored line to left of the series name in the legend below the graph. Alternately, use the "Display Styles" > "Series Specif
Q
How do I exit graph edit mode?
A
Hit the escape key or click the graph title and select edit again.
Q
What is Grafana on CentOS?
A
Grafana is open source data visualization and tracking suite. It supports databases such as Graphite, Elasticsearch, Included, Prometheus etc. The application has a metric analytics, with the capability to control and create your own dashboard to your own apps or infrastructure performance monitoring.
Q
How do i reset admin password?
A
There is sadly not built in way to easily do this. The below instructions should work for sqlite3. If you use MySQL or Postgres the SQL command should also work. $ sudo sqlite3 /var/lib/grafa