How to install Grafana in ubuntu

Published: 26 January 2023
on channel: Quickloss3
404
20

Update Server:
apt update && apt upgrade -y

set hostname:
hostnamectl set-hostname ex.example.com

Add Grafana Repository:
apt install wget curl gnupg2 apt-transport-https software-properties-common -y
wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -
echo "deb https://packages.grafana.com/oss/deb stable main" | tee -a /etc/apt/sources.list.d/grafana.list
apt update

Install Grafana:
apt install grafana -y
grafana-server -v
systemctl start grafana-server
systemctl enable grafana-server
systemctl status grafana-server
ss -antpl | grep 3000

Configure Nginx as a Reverse Proxy for Grafana:
apt install nginx -y
nano /etc/nginx/conf.d/grafana.conf
paste
server {
server_name ex.example.com;
listen 80 ;
access_log /var/log/nginx/grafana.log;

location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

nginx -t
systemctl restart nginx

Access Grafana Dashboard:
http://ex.example.com

user-admin
pass-admin


Watch video How to install Grafana in ubuntu online without registration, duration hours minute second in high quality. This video was added by user Quickloss3 26 January 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 404 once and liked it 20 people.