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.
[email protected]:~# 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
[email protected]:~# apt-get install -y apt-transport-https [email protected]:~# apt-get install -y software-properties-common wget [email protected]:~# apt autoremove [email protected]:~# wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - [email protected]:~# add-apt-repository "deb https://packages.grafana.com/oss/deb stable main" [email protected]:~# apt-get update [email protected]:~# apt-get install grafana -y
Step #03: Restart and enable Grafana service using below command.
[email protected]:~# /bin/systemctl daemon-reload [email protected]:~# /bin/systemctl enable grafana-server [email protected]:~# /bin/systemctl start grafana-server [email protected]:~# systemctl start grafana-server [email protected]:~# systemctl status grafana-server [email protected]:~# 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 [email protected] 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 [email protected] 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.
[email protected]:~# apt install nginx
After installation done then backup nginx main config file.
[email protected]:~# cp /etc/nginx/sites-available/default /etc/nginx/sites-available/default-back
Now open default config file.
[email protected]:~# 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.
[email protected]:~# service nginx restart [email protected]:~# 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.
- 12 Steps to Organize Photos on Your Computer - March 20, 2023
- 9 Ways to Speed Up Your MacBook Yosemite - February 21, 2023
- How To Install GitLab CE on Ubuntu 22.04 - December 15, 2022
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!