X

How To Install Grafana Server On Ubuntu 16.04 Server

Grafana is an open source data visualization. Many database support as Grafana Server like as mysql, MSSQL, MariaDB, Elastix search, Promethuse etc. I want to show how to install it on Ubuntu 16.04.

Check Web Site URL From Zabbix Server
How To Install OsTicket On Ubuntu 16.04

Ready to hosts file

root@Gragfana_Server:~# vi /etc/hosts

Insert your server ip address

#127.0.0.1 localhost
10.66.50.20 Grafana_Server

Step #01: Run update and upgrade command

root@Grafana_Server:~# apt-get update

If can’t update command then add google public dns server into resolve.conf.

root@Grafana_Server:~# vi /etc/resolv.conf

Add nameserver 8.8.8.8

nameserver 8.8.8.8

Then run update command

root@Grafana_Server:~# apt-get update
root@Grafana_Server:~# apt-get upgrade -y
root@Grafana_Server:~# apt-get update --fix-missing (not needed)

Step #02: Download Grafana deb package from below link.

root@Grafana_Server:~# wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.0.4_amd64.deb
root@Grafana_Server:~# dpkg -i grafana_5.0.4_amd64.deb

or If any problem then add Grafana deb into source file

root@Grafana_Server:~# vi /etc/apt/sources.list

Insert below line

deb https://packagecloud.io/grafana/stable/debian/ stretch main

Check command below entry correct

root@Grafana_Server:~# curl https://packagecloud.io/gpg.key | sudo apt-key add -
root@Grafana_Server:~# apt-get update
root@Grafana_Server:~# apt-get install grafana
root@Grafana_Server:~# apt-get -f install -y
root@Grafana_Server:~# apt-get install grafana
root@Grafana_Server:~# apt-get install -y apt-transport-https

Step #03: After completed installation then edit grafana.ini file

root@Grafana_Server:~# vi /etc/grafana/grafana.ini

Make sure comment out below setting are correct into grafana.ini file.

[server]
protocol = http
http_addr =10.66.20.10
http_port = 3000
domain = localhost
root_url = http://10.66.20.10:3000

[security]
admin_user = admin
admin_password = admin
secret_key = SW2YcwTIb9zpOOhoPsMm

Step #04: Now install virtual web server apache2.

root@Grafana_Server:~# apt install apache2 -y

Restart proxy

root@Grafana_Server:~# a2enmod proxy proxy_http xml2enc

Restart apache web server

root@Grafana_Server:~# service apache2 restart

Create one virtual host for Grafana server

root@Grafana_Server:~# vi /etc/apache2/sites-available/apache2-grafana.conf

Insert all below line into conf file

<VirtualHost *:80>
ProxyPreserveHost On
ProxyPass / http://10.66.20.10:3000/
ProxyPassReverse / http://10.66.20.10:3000/
ServerName example.com
</VirtualHost>

Reload apache proxy and grafana service

root@Grafana_Server:~# a2enmod proxy
root@Grafana_Server:~# /etc/init.d/apache2 restart
root@Grafana_Server:~# a2ensite apache2-grafana
root@Grafana_Server:~# service apache2 reload
root@Grafana_Server:~# update-rc.d grafana-server defaults 95 10
root@Grafana_Server:~# service grafana-server start
root@Grafana_Server:~# service apache2 restart

Step #05: Installation completed. Now browse your server ip and Grafana default port.

Goto web browser type http://10.66.20.10:3000
User Name : admin
Password : admin

After first time login then change your admin password.

Also see my YouTube video for more information. Please subscribe my channel and share blog post to any other.

0 0 votes
Article Rating
Admin: I am system administrator as Windows and Linux platform. I have 4 years skilled from the professional period. I have to configure Linux based system such as an Asterisk VOIP system, Network monitoring tools (ZABBIX), Virtualization (XEN Server), Cloud computing (Apache CloudStack) etc. Now share my professional skill each interested person. Thanks to all.
Leave a Comment