Install and Start Grafana
Grafana is the analytics platform for all your metrics. Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored.
In this lecture, I will manually install Grafana on an Ubuntu 20.04, and then start it.
In this course all my examples are executed on an unrestricted Ubuntu 20. You can get minimal Ubuntu 20 server from cloud providers. In this course I used Digital Ocean, with this link https://m.do.co/c/23d277be9014, you will get $50 credit for 30 days, where you can create and delete as many VMs as you wish. The minimal $5 a month Ubuntu 18 Droplet is what I used for all the examples in the course. Other providers are Hetzner, AWS, Azure, GCP and many more. Each solution will have there own problems you will need to overcome especially with giving your Ubuntu network access and sufficient permissions. You can also use a Oracle Virtual Box with an Ubuntu VM, Docker, Kubernetes, Vagrant, etc. They all have there specific complications. If you are not proficient in your chosen platform that you install Ubuntu, you will have issues. Keep it simple and use the Digital Ocean link I provided above so that you can follow all the examples in the course with minimal issue. If you use Centos, you will have even more specific issues with SELINUX that you will need to overcome. After the course, once you are familiar with Grafana, then you should install it on your chosen environment so that you know whether your problem is related to Grafana, or your chosen environment.
With a new install of your operating system, I am using Ubuntu 20.04 LTS, we should SSH onto our new server.
On Windows we can use Putty as our SSH client. SSH means 'Secure Shell'.
Download and Install Putty, and add your server ip address to the Session configuration page.
Once you have connected, on Ubuntu, make sure your package lists are updated.
sudo apt update
Then ensure that the dependencies for Grafana are installed.
sudo apt-get install -y adduser libfontconfig1
Now to download the binary, and run the debian package manager.
wget https://dl.grafana.com/oss/release/grafana_7.1.3_amd64.deb sudo dpkg -i grafana_7.1.3_amd64.deb
Grafana is updated very regularly. To see the list of release version numbers available to download, visit https://github.com/grafana/grafana/tags
The install has now completed. You can now start the Grafana service
sudo service grafana-server start
Check the status
sudo service grafana-server status
If you reboot your server, the Grafana Service may not restart automatically.
You can set the Grafana service to auto restart after reboot by entering,
sudo systemctl enable grafana-server.service
Your Grafana server will be hosted at
http://[your Grafana server ip]:3000
The default Grafana login is
Username : admin Password : admin
You have the option to update your password upon first login and then be presented with the option to add a new data source and create dashboards and users.
Grafana is updated very regularly. To update Grafana is very simple.
Find the version you want, eg 7.1.5, and prepare the commands for your operating system.
eg, for Ubuntu 20.4
wget https://dl.grafana.com/oss/release/grafana_7.1.5_amd64.deb sudo dpkg -i grafana_7.1.5_amd64.deb
The Grafana service should restart automatically and next time you log in, you will be using the version you updated to.
If you upgraded Grafana, and you decide that you don't want it, You can downgrade back to the version you had before.
If you kept the downloaded install packages from the first time, then can just re use it and rerun the
dpkg(Ubuntu) command from earlier.
Eg, downgrade back to 7.1.3
sudo dpkg -i grafana_7.1.3_amd64.deb