Grafana

To install Grafana on Ubuntu, you can follow these steps. As of my last knowledge update in September 2021, Grafana supports Ubuntu 18.04 and 20.04.

Here's how you can install Grafana on Ubuntu:

  1. Update your package list to ensure you have the latest information about available packages:

sudo apt update
  1. Install Grafana with the APT package manager. You can do this by adding the Grafana APT repository to your system and then installing Grafana:

sudo apt install -y software-properties-common
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
  1. Import the Grafana GPG key to verify the integrity of packages:

wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
  1. Update your package list again:

sudo apt update
  1. Install Grafana:

sudo apt install grafana
  1. Start the Grafana service and enable it to start on boot:

sudo systemctl start grafana-server
sudo systemctl enable grafana-server
  1. You can now access the Grafana web interface by navigating to http://localhost:3000 in your web browser. The default username and password are both set to "admin." You will be prompted to change the password upon your first login.

  2. To make Grafana accessible over the network, you may need to configure your firewall and Grafana's configuration file. Edit the Grafana configuration file:

sudo nano /etc/grafana/grafana.ini

Find the [server] section and set the http_addr configuration option to the IP address or hostname of your server. For example:

[server]
http_addr = your_server_ip_or_hostname

Save the file and exit the text editor.

  1. If you made changes to the configuration file, restart the Grafana service to apply the changes:

sudo systemctl restart grafana-server
  1. Finally, allow traffic on port 3000 (or the port you configured in the Grafana configuration file) through your firewall:

sudo ufw allow 3000/tcp

Now you should be able to access Grafana from other machines on your network by navigating to http://your_server_ip_or_hostname:3000 in a web browser.

Please note that the installation steps may vary if there have been updates or changes to Grafana since my last knowledge update in September 2021. Always refer to the official Grafana documentation for the most up-to-date installation instructions.

Last updated

Was this helpful?