Table of contents
- Supported Operating Systems
- Grafana supports the following databases:
- Grafana has a web interface and below are the list of supported browsers:
- Below are the commands to install Grafana:
- Standalone Linux Binaries(64 Bit):
- OpenSUSE and SUSE:
- Configuration file(s) is stored /etc/grafana/grafana.ini If required, You can change the default port from 3000 to another port in this configuration file.
- Upgrading from Grafana 6 to Grafana 7
In this article, you are going to learn all the steps necessary for Installing Grafana on Linux.
Grafana installation is simple and quick. Here are good to-know things before you start installing Grafana:
Table of Contents
Supported Operating Systems
Debian / Ubuntu
RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)
macOS
Windows
Grafana requires a database to store its configuration data, such as users, data sources, and dashboards. The exact requirements depend on the size of the Grafana installation and the features used.
Grafana supports the following databases:
SQLite
MySQL
PostgreSQL
By default, Grafana installs with and uses SQLite, which is an embedded database stored in the Grafana installation location.
If you want another database then you have to install that particular database.
Grafana has a web interface and below are the list of supported browsers:
Chrome/Chromium
Firefox
Safari
Microsoft Edge
Internet Explorer 11 is only fully supported in Grafana versions prior v6.0.
Below are the commands to install Grafana:
Ubuntu and Debian(64 Bit):
sudo apt-get install -y adduser libfontconfig1
wget https://dl.grafana.com/oss/release/grafana_6.7.3_amd64.deb
sudo dpkg -i grafana_6.7.3_amd64.deb
Standalone Linux Binaries(64 Bit):
wget https://dl.grafana.com/oss/release/grafana-6.7.3.linux-amd64.tar.gz
tar -zxvf grafana-6.7.3.linux-amd64.tar.gz
Red Hat, CentOS, RHEL, and Fedora(64 Bit):
wget https://dl.grafana.com/oss/release/grafana-6.7.3-1.x86_64.rpm
sudo yum install grafana-6.7.3-1.x86_64.rpm
OpenSUSE and SUSE:
wget https://dl.grafana.com/oss/release/grafana-6.7.3-1.x86_64.rpm
sudo rpm -i --nodeps grafana-6.7.3-1.x86_64.rpm
After a successful installation and configuration, you should be able to see grafana web url by going to below default link:
localhost:3000/grafana
Configuration file(s) is stored /etc/grafana/grafana.ini If required, You can change the default port from 3000 to another port in this configuration file.
If you’re running Grafana on a different server and want to access it remotely then use the below link:
http://<<ip address>>:<<port>>
e.g.
http://10.0.0.7:3000
Default Username and Password to access Grafana:
username: admin
password: admin
Managing Grafana Services:
sudo systemctl status grafana-server.service
sudo systemctl start grafana-server.service
sudo systemctl stop grafana-server.service
Managing Grafana Services:
sudo yum remove grafana-6.7.3-1.x86_64
Upgrading from Grafana 6 to Grafana 7
Now I am going to show you steps for Upgrading from Grafana 6 to Grafana 7. We will be installing the latest version of Grafana RPM on top of existing version (6) , to Upgrade Grafana.
Download Grafana's Latest Version
First step is to install latest version of Grafana. Based on whenever you are reading this article latest version of Grafana may be different. You can always refer to latest version of Grafana from official Grafana website. In this example my operating system already has access to internet, so I am going to run wget command to download Grafana RPM.
wget https://dl.grafana.com/oss/release/grafana-7.0.1-1.x86_64.rpm
Installing Grafana 7
If you already have older version of Grafana installed then running higher version of Grafana on top of that results in the Upgrade of Grafana. So all you have to do is to start installation of latest version of Grafana as shown below.
sudo yum install grafana-7.0.1-1.x86_64.rpm
Backup Grafana Database before the upgrade
Ensure to backup everything before proceeding with the Upgrade:
Backup the database. If you’re using SQLite Db then the Default Location would be as below:
[grafanaadmin@itpanther02 ~]$ ll /var/lib/grafana/
total 460
-rw-r--r--. 1 grafana grafana 471040 May 12 19:09 grafana.db
Backup the database. If you’re using MySQL Db then you can take the backup using the below command, alternatively, you can request your DBA team to do this for you.
Syntax: mysqldump -u <<username>> -h <<server hostname/ip>> -p<<password>> <<database name>> \> <<output location>>
Example: mysqldump -u grafana -h localhost -pGrafana grafanadb > /home/nilesh/grafana.sql