Add the grafana repository key
curl https://packagecloud.io/gpg.key | sudo apt-key add -
Create repository file for influxdb.
echo "deb https://packagecloud.io/grafana/stable/debian/ jessie main" | sudo tee /etc/apt/sources.list.d/grafana.list
Update apt Metadata by running command below.
apt update
Now we are ready to install grafana.
apt install grafana
configure grafana to start automatically using systemd
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable grafana-server
start grafana-server
sudo /bin/systemctl start grafana-server
or
sudo service grafana-server start