How to install Grafana in ubuntu

Опубликовано: 26 Январь 2023
на канале: 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


Смотрите видео How to install Grafana in ubuntu онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Quickloss3 26 Январь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 404 раз и оно понравилось 20 людям.