How To Quick Install Grafana Server On Ubuntu 18.046 min read
Now I want to share how to install Grafana server on ubuntu 18.04 local or public vps. This tutorial is for only install process. And I am not grantee all package and repo are available. If you can see some package are missing so you can try from official web site.
My server details :
- Server OS : Ubuntu 18.04
- Disk Space : 50GB
- RAM : 2GB
- vCPU : 2
★ How To Install Docker Community Edition On Centos 7
★ How To Upgrade Zabbix Server 4.0 To 4.4 On CentOS 8
Step #01: Must be server update and upgrade done.
root@Ubuntu-18:~# vi /etc/resolv.conf
nameserver 8.8.8.8
For save press Esc type :wq the press Enter.
Step #02: After complete then goto next step for install Grafana
root@Ubuntu-18:~# apt-get install -y apt-transport-https root@Ubuntu-18:~# apt-get install -y software-properties-common wget root@Ubuntu-18:~# apt autoremove root@Ubuntu-18:~# wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - root@Ubuntu-18:~# add-apt-repository "deb https://packages.grafana.com/oss/deb stable main" root@Ubuntu-18:~# apt-get update root@Ubuntu-18:~# apt-get install grafana -y
Step #03: Restart and enable Grafana service using below command.
root@Ubuntu-18:~# /bin/systemctl daemon-reload root@Ubuntu-18:~# /bin/systemctl enable grafana-server root@Ubuntu-18:~# /bin/systemctl start grafana-server root@Ubuntu-18:~# systemctl start grafana-server root@Ubuntu-18:~# systemctl status grafana-server root@Ubuntu-18:~# update-rc.d grafana-server defaults
Status like below :
● grafana-server.service - Grafana instance Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2020-04-26 05:35:51 UTC; 44min ago Docs: http://docs.grafana.org Main PID: 7358 (grafana-server) Tasks: 15 (limit: 1101) CGroup: /system.slice/grafana-server.service └─7358 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=deb cfg:default.paths.logs Apr 26 05:35:53 Ubuntu-18.04 grafana-server[7358]: t=2020-04-26T05:35:53+0000 lvl=info msg="Initializing provisioningServiceImpl" logger=server Apr 26 05:35:53 Ubuntu-18.04 grafana-server[7358]: t=2020-04-26T05:35:53+0000 lvl=info msg="Backend rendering via phantomJS" logger=rendering renderer=phantomJS Apr 26 05:35:53 Ubuntu-18.04 grafana-server[7358]: t=2020-04-26T05:35:53+0000 lvl=warn msg="phantomJS is deprecated and will be removed in a future release. You Apr 26 05:35:53 Ubuntu-18.04 grafana-server[7358]: t=2020-04-26T05:35:53+0000 lvl=info msg="Initializing Stream Manager" Apr 26 05:35:53 Ubuntu-18.04 grafana-server[7358]: t=2020-04-26T05:35:53+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=htt Apr 26 05:36:25 Ubuntu-18.04 grafana-server[7358]: t=2020-04-26T05:36:25+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET Apr 26 05:37:33 Ubuntu-18.04 grafana-server[7358]: t=2020-04-26T05:37:33+0000 lvl=info msg="Successful Login" logger=http.server User=admin@localhost Apr 26 05:39:28 Ubuntu-18.04 grafana-server[7358]: t=2020-04-26T05:39:28+0000 lvl=info msg="Successful Logout" logger=http.server User=admin@localhost Apr 26 05:39:28 Ubuntu-18.04 grafana-server[7358]: t=2020-04-26T05:39:28+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method Apr 26 05:45:53 Ubuntu-18.04
Now goto browser for access Grafana server using default port 3000.
http://10.66.110.30:3000/
Using Grafana default user name and password
User Name : admin
Password : admin
Then change after first time login.
Step #04: I want to switch Grafana default port 3000 to 80.
So now I want to install any web server like nginx or apache.
root@Ubuntu-18:~# apt install nginx
After installation done then backup nginx main config file.
root@Ubuntu-18:~# cp /etc/nginx/sites-available/default /etc/nginx/sites-available/default-back
Now open default config file.
root@Ubuntu-18:~# vi /etc/nginx/sites-available/default
Then clear all text from main config file and just add below details for nginx config.
server { listen 80; server_name http://10.66.110.30; location / { proxy_pass http://10.66.110.30:3000/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
Now restart nginx web server.
root@Ubuntu-18:~# service nginx restart root@Ubuntu-18:~# systemctl restart grafana-server
Now browse your server ip address like http://10.66.110.30/login. I hope you successfully browse using your server ip address. If any problem so please see my YouTube video for more details.
- How To Install Zabbix Server 6.4 On AlmaLinux 8 Server - August 9, 2024
- How To Clear RAM Memory Cache Buffer Linux Server - February 29, 2024
- How To Install Apache Cloud Stack Management Server 4.17 On Ubuntu 22.04 - February 1, 2024
We really appreciate for your support for buying me a coffee.
It takes us a while to compose and upload new content, as they have to be checked to see if Properly works. We appreciate you if you help me for one cup of coffee to keep us awake and always deliver good quality content.
No contribution is small of an amount. We are grateful for any amount you support us with. Thank you!