In this guide, we are going to learn how to install and set up Grafana in Linux.
Grafana is a multi-platform open source analytics and interactive visualization web application. It provides charts, graphs, and alerts for the web when connected to supported data sources.
Installing grafana in Debian or Ubuntu
To install the latest OSS release
Type this interminal
sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
Add this repository for stable releases:
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
Add this repository if you want beta releases:
echo "deb https://packages.grafana.com/oss/deb beta main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
After you add the repository:
sudo apt-get update
sudo apt-get install grafana
Install Grafana on RPM-based Linux (CentOS, Fedora, OpenSuse, Red Hat)
Add a new file to your YUM repo using the method of your choice. The command below uses nano.
sudo vim /etc/yum.repos.d/grafana.repo
For OSS releases:
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
Install Grafana with one of the following commands:
sudo yum install grafana
Start the server with systemd
This starts the grafana-server process as the grafana user, which was created during the package installation.
To start the service and verify that the service has started:
sudo systemctl daemon-reload
sudo systemctl start grafana-server
sudo systemctl status grafana-server
Configure the Grafana server to start at boot:
sudo systemctl enable grafana-server.service
2 Comments
Pingback: Monitor Multiple Servers With Grafana, Influxdb & Telegraf
Pingback: How to install and configure Grafana in Rocky Linux/Centos 8