More Info : https://haneefputtur.com/grafana-inst...
#################################################################
Installing grafana on ubunutu 20.04 server
#Update ubuntu
sudo apt-get update -y
#Install necessary pacakges
sudo apt-get install wget curl gnupg2 apt-transport-https software-properties-common -y
#Add gpg key
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
#updo repo list of ubuntu
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
#refresh and update apt-get
sudo apt-get update -y
#Install Grafana
sudo apt-get install grafana -y
#Check Grafana version for successfull installation
grafana-server -v
#start grafana service
sudo systemctl start grafana-server
#Add auto start grafana
sudo systemctl enable grafana-server
#Check grafana service status
systemctl status grafana-server
#Check grafana running port
ss -antpl | grep 3000
#Install ngix to Add reverse proxy
sudo apt-get install nginx -y
#Add ngix config to redirect port 4
sudo nano /etc/nginx/conf.d/grafana.conf
server {
server_name enter-your-ec2-dnsnamehere;
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;
}
}
increase bucket size to avoid long host name error
sudo nano /etc/nginx/nginx.conf
server_names_hash_bucket_size to 128;
#Test ngix
sudo nginx -t
#restart ngix
sudo systemctl restart nginx
Now access the server from public with admin / admin
Watch video Grafana Installation Step by Step AWS EC2 instance in 10 Minutes! online without registration, duration hours minute second in high quality. This video was added by user Mahammad Haneef 08 October 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,07 once and liked it 7 people.