Install and Start Grafana
Video Lecture
Description
Now that we have a server, we will install Grafana on it.
With a new installation of your operating system, I am using Ubuntu 24.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 new servers IP address to the Session configuration page and save.
Once you have connected, on Ubuntu, make sure your package lists are updated.
# |
|
Now to select your version of Grafana.
https://grafana.com/grafana/download
Then ensure that the dependencies for Grafana are installed.
# |
|
Now to download the binary.
# |
|
And now run the package manager.
# |
|
The installation has now completed. You can now start the Grafana service
# |
|
Check the status
# |
|
Warning
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,
# |
|
Your Grafana server will be hosted at
http://[your Grafana server ip]:3000
The default Grafana login is
Username | Password |
---|---|
admin | admin |
You will need 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.
Firewall
Our server is on the internet with a public IP address.
Since Grafana will have very privileged access to our systems, we should configure a firewall to only allow access from our own network.
All cloud providers will give you the option of having a firewall, and it is good to understand how to use them.
We will do a lot of firewall configurations throughout the course, but in this first part we will ensure that our firewall will only allow our local network to access our Grafana servers IP address on ports 22 and 3000.
Reset Password
If you forgot your password then you can reset it using the grafana-cli
command
# |
|
Your username
/password
will now be admin
/admin
Next time you log in, you can update your password to something else other than admin
More Info : https://grafana.com/docs/grafana/latest/administration/cli/#reset-admin-password
Grafana Cloud
Note that this course is predominantly about installing and managing Grafana OSS (Open Source). After completing most of this course, you would have become familiar enough with Grafana to begin experimenting with your own Grafana Cloud deployment.
Grafana Cloud is a managed service where you can subscribe to certain levels of support. This may be a more suitable approach for your corporation long term rather than building and managing your Grafana server manually is I show in this course. While it is important to know the inner details of managing your own Grafana server, it can later be more strategic for your business to outsource the many aspects of it.
So, when that time comes, use my link here, Grafana Cloud, and you will receive 28 days of PRO trial rather than the default 14 days.
Benefits,
- Upgraded 28-day trial to Grafana Pro (vs. the standard 14-days)
- 3 users
- 10k metrics
- 50GB logs
- 50GB traces
- Automatic updates
- 30 notifications for OnCall
- 14-day retention
Sign up at Grafana Cloud
Error : grafana depends on musl
Since Grafana v10.1, Grafana now also needs the musl
dependency installed before you can install.
sudo apt-get install -y musl