How To Install Grafana on AlmaLinux 8

In this article, we want to teach you How To Install Grafana on AlmaLinux 8.

Grafana is a free and open-source software used by developers and administrators to visualize data generated by different sources in an interactive & dynamic dashboard.

How To Install Grafana on AlmaLinux 8

To set up Grafana on AlmaLinux 8, you need to log in to your server as a non-root user with sudo privileges and set up a basic firewall. To do this, you can follow our article the Initial Server Setup with AlmaLinux 8.

Now follow the steps below to install Grafana on your server.

Set up and configue Grafana on AlmaLinux 8

You can install Grafana in a few ways on your server. In this guide, you will learn to install Grafana by creating the Grafana repository.

First, create and open the Grafana repo file with your favorite text editor, here we use vi:

sudo vi /etc/yum.repos.d/grafana.repo

Then, add the following content into the file:

[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt

When you are done, save and close the file.

Now update your local package index with the following command:

sudo dnf update -y

Here you can install Grafana with the command below:

sudo dnf install grafana

When your installation is completed, start your Grafana service on AlmaLinux 8 with the following command:

sudo systemctl start grafana-server

If you want to enable your service to start at boot run the following command:

sudo systemctl enable grafana-server

You can verify that your Grafana service is active and running on your AlmaLinux 8 with the following command:

sudo systemctl status grafana-server

In your output you will see:

Output
grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; ven>
Active: active (running) since Sat 2021-12-11 08:55:48 EST; 2min 20s ago
Docs: http://docs.grafana.org
Main PID: 89091 (grafana-server)
Tasks: 9 (limit: 11409)
Memory: 43.5M
CGroup: /system.slice/grafana-server.service
└─89091 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini ->

We assumed that you have enabled the firewall from the requirements.

At this point, you need to allow traffic for Grafana on port 3000 through the firewall on AlmaLinux 8. To do this, run the following command:

sudo firewall-cmd --add-port=3000/tcp --permanent

Now reload the firewall to apply the new rules:

sudo firewall-cmd --reload

Access Grafana Web Interface

At this step, you can access the Grafana web interface on ALmaLinux 8 by typing your server’s IP address in your web browser followed by 3000:

http://your-server-ip-address:3000

You will see the Grafana login screen:

Grafana login screen

At this window, enter admin for the username and password and you can change the password of your Grafana. Then, you will see the Grafana welcome dashboard screen:

Grafana welcome dashboard

Conclusion

At this point, you learn to set up Grafana on AlmaLinux 8.

Hope you enjoy using it.

May this article about How To Install Grafana on Centos 7 be useful for you.

Also, may this article about How To Install Grafana on Ubuntu 20.04 be useful for you too.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!