Install Grafana in Ubuntu 24.04

In this article, we cover how to install Grafana in Ubuntu 24.04 release. Grafana helps us understand the data better. It is mainly an open-source visualization solution. We can collect and visualize data through Grafana and that helps us make better decisions.

There are multiple ways to install Grafana in Ubuntu. We will install it through a deb package.

Note: The following operations require Administrative rights. Contact your System Administrator for assistance if you don’t have the required rights.

Install Grafana in Ubuntu 24.04

The package isn’t available through the standard Ubuntu repository. Therefore, we will download the relevant deb package from the official website of Grafana.

Grafana Download

Select the version you would like to install and the Edition. At the time of writing, the latest version was 10.2.3 and we chose to install Enterprise edition. Select the Linux button. And, this would get us a download link.

We downloaded the pacakge file: grafana-enterprise_10.2.3_amd64.deb

Now, we will use the Advanced Packaging Tool (apt) to install the package file. Installing a deb package through apt would also install any additional packages or dependencies.

So, open a terminal and issue the following:

sudo apt install ./grafana-enterprise_10.2.3_amd64.deb

Now, we have to first enable and start the grafana-server.service. This can be done through:

sudo systemctl enable grafana-server.service
sudo systemctl start grafana-server.service

Lastly, run grafana server:

sudo grafana-server

At this stage, we got the following two errors:

Error 1: Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath

Fix: sudo grafana-server -homepath /usr/share/grafana

Error 2: HTTPServer run error: failed to open listener on address listen tcp bind: address already in use

Fix: Edit the file

sudo nano /etc/grafana/grafana.ini

And, change the port:

# The http port to use
http_port = 3000

to some other port. Remember to delete the semi-colon at the beginning of the line.

Once done try running the following command again:

sudo grafana-server -homepath /usr/share/grafana

And, open a web browser and go to:<port-number>

It would open the Grafana page, default username and password is admin.

In conclusion, we have covered here how to install Grafana in the Ubuntu 24.04 release.

Similar Posts