Skip to main content

How To Install Grafana on AlmaLinux and Rocky Linux

In this guide we will show how to install Grafana on AlmaLinux 8/9 and Rocky Linux 8/9

Updated over 2 weeks ago

Grafana is a popular open source platform for monitoring, visualization, and observability. It allows you to build dashboards from metrics, logs, and other data sources such as Prometheus, InfluxDB, MySQL, and many more.

Grafana runs as a single systemd service, does not require a separate runtime stack, and is well suited for VPS and server environments.

This tutorial was tested on AlmaLinux 8/9 and Rocky Linux 8/9.

0. Prerequisites

  • Root or sudo privileges

  • Internet access

  • At least 1 GB RAM (2 GB recommended)

  • Port 3000 available on the server

1. Installing Grafana

1.1 Update your system

Update all installed packages:

dnf update -y

1.2 Install required dependencies

Install tools required for repository and package management:

dnf install -y dnf-utils wget

1.3 Add the Grafana YUM repository

Create the Grafana repository file:

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

Paste the following content in this file:

[grafana]
name=Grafana OSS
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

Refresh repository metadata:

dnf makecache

Type y and press Enter when you will see the following message:

1.4 Install Grafana

Install Grafana using DNF:

dnf install grafana -y

2. Managing the Grafana service

2.1 Start Grafana

You can start the Grafana service by running the following command:

systemctl start grafana-server

2.2 Enable Grafana on boot

To configure Grafana to start automatically on system boot, run the following command:

systemctl enable grafana-server

2.3 Check service status

To check the status of the Grafana service, use the following command:

systemctl status grafana-server

The service should be shown as active (running).

3. Firewall considerations

If you are using a firewall other than the default iptables setup, ensure that port 3000 is open and allowed.

For example, if firewalld is enabled, allow access to port 3000:

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

If you plan to expose Grafana publicly, consider:

  • Using a reverse proxy (NGINX or Apache)

  • Enabling HTTPS

  • Restricting access by IP or authentication

4. Accessing Grafana

By default, Grafana listens on port 3000.

Open your browser and navigate to:

http://your_server_ip:3000

Default login credentials:

  • Username: admin

  • Password: admin

Enter the default login credentials:

On first login, Grafana will prompt you to set a new password:

Enter a new password, confirm it, and click "Submit".

After that, you will be taken to the Grafana dashboard:

<a href="https://downloads.intercomcdn.eu/i/o/vwhwt4d6/92642043/35f952a8e0c456eb31ff3162b6fd/Screenshot+2026-01-22+at+11-29-11+Home+-+Dashboards+-+Grafana.png?expires=1770768000&amp;signature=11144e251a93b7122605856bb184d76e89b3af1edfc7073b848f0c021ef0506d&amp;req=2ddpwVr6qDRk2hr889pg6o38gUvcFTQIVixvhUd3qmITXsJmkRewfE%2BeYc0%3D%0A" target="_blank" rel="nofollow noopener noreferrer">https://downloads.intercomcdn.eu/i/o/vwhwt4d6/92642043/35f952a8e0c456eb31ff3162b6fd/Screenshot+2026-01-22+at+11-29-11+Home+-+Dashboards+-+Grafana.png?expires=1769234400&amp;signature=a5e9454058f9cb6871502030d76d22d2d67f181726fa78c788770f9434fe7c60&amp;req=2ddpwVr6qDRk2hj99dpg6teBqfnLE6yC3Fjj5xwnSMQ%2FfTkGeL0gaRMLmf2l%0A1rrFAcANpggJXCIWNEiA5ESV%0A</a>

5. Basic usage

After logging in, you can:

  • Add a data source (Connections β†’ Add new connection)

  • Create dashboards

  • Import community dashboards using dashboard IDs

  • Monitor system metrics, applications, or services

Grafana stores its configuration and data locally by default and does not require an external database for basic usage.

Did this answer your question?