Install Grafana on AlmaLinux 9 | Best Monitoring Tool
In this guide from OrcaCore, you will learn How To Install Grafana on AlmaLinux 9. Grafana is an open-source software that is used for visualization and analytics. You can follow this article to set up your Grafana and access your Grafana dashboard. The goal of this article is to provide a comprehensive guide on how to Install Grafana on AlmaLinux 9.
To complete this guide, you must 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 guide on the Initial Server Setup with AlmaLinux 9.
Now follow the steps below to complete this guide.
Step 1. Download Grafana RPM Package on AlmaLinux 9
First, you need to update your local package index with the following command:
sudo dnf update -y
In this guide, you will learn to Install Grafana on AlmaLinux 9 by using an RPM package on AlmaLinux 9.
Visit the Grafana Downloads page and get the RPM package with the command below:
sudo wget https://dl.grafana.com/oss/release/grafana-VERSION.x86_64.rpm
At the current time, the latest version of Grafana is 9.1.6:
sudo wget https://dl.grafana.com/oss/release/grafana-9.1.6-1.x86_64.rpm
Then, use the following command to install Grafana:
sudo dnf install grafana-9.1.6-1.x86_64.rpm -y
Step 2. How To Start Grafana Service?
When your installation is complete, reload the system daemon with the command:
sudo systemctl daemon-reload
Now start and enable the Grafana service by running the commands below:
# sudo systemctl start grafana-server
# sudo systemctl enable grafana-server
Verify your Grafana service is active and running on AlmaLinux 9:
sudo systemctl status grafana-server
**Output**
● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; v>
Active: **active** (**running**) since Thu 2022-09-22 04:09:53 EDT; 11s ago
Docs: http://docs.grafana.org
Main PID: 5010 (grafana-server)
Tasks: 7 (limit: 23609)
Memory: 39.7M
CPU: 942ms
CGroup: /system.slice/grafana-server.service
└─5010 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini
Step 3. Configure Firewall Settings For Grafana
The Grafana server listens on port 3000 by default, you can verify this with the command below:
sudo ss -plunt|grep grafana
**Output**
tcp LISTEN 0 4096 *:**3000** *:* users:(("grafana-server",pid=5010,fd=8))
At this point, you need to allow port Grafana, which is 3000, through the firewall on AlmaLinux 9. 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
Step 4. How To Access Grafana Web Console?
At this step, you can access the Grafana web interface on ALmaLinux 9 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. At this window, enter admin for the username and password and click Log in.

Then, change the default password of Grafana and click submit.

At this point, you will see the Grafana welcome dashboard screen:

That’s it, you are done. From here, you can start using your Grafana.
Conclusion
At this point, you have learned to Install Grafana on AlmaLinux 9 by using an RPM package and starting your Grafana service, and accessing your Grafana dashboard.
Hope you enjoy it. Please subscribe to us on Facebook, Instagram, and YouTube.
Also, you may like to read the following articles:
Setting Up Linux Kernel 6.14 on Ubuntu 24.04
Install Python 3.13 on AlmaLinux
VirtualBox Setup on AlmaLinux 9
FAQs
Where is the Grafana Configuration File?
You can customize Grafana by editing the configuration file at **/etc/grafana/grafana.ini** to suit your preference.
Which port does Grafana use by default?
Grafana uses port 3000 by default. Make sure to allow it in the firewall.
How do I change the default Grafana admin password?
After the first login, Grafana will prompt you to change it.
Is SELinux an issue when installing Grafana?
Grafana usually works fine with SELinux in enforcing mode, but you might need to adjust policies if using external plugins or custom data sources.
Alternative Solutions to Install Grafana on AlmaLinux 9
While the RPM package installation method is straightforward, there are alternative approaches to Install Grafana on AlmaLinux 9. Here are two alternative methods, along with explanations and code examples:
1. Installing Grafana using YUM Repository
This method leverages the Grafana YUM repository, ensuring you receive updates seamlessly through the standard package management system.
Explanation:
This approach configures your system to recognize the official Grafana repository. Once configured, you can use the yum
package manager (which is essentially dnf
under the hood in AlmaLinux 9, using the same underlying libraries) to install, update, and remove Grafana. This method is preferred for its ease of maintenance and automatic updates.
Steps:
-
Add the Grafana YUM repository: Create a new repository file.
sudo nano /etc/yum.repos.d/grafana.repo
Add the following content to the file:
[grafana] name=grafana baseurl=https://rpm.grafana.com repo_gpgcheck=1 enabled=1 gpgcheck=1 gpgkey=https://rpm.grafana.com/gpg.key sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
-
Install Grafana: Now, you can install Grafana using
dnf
:sudo dnf install grafana -y
-
Start and Enable Grafana: As before, start and enable the Grafana service:
sudo systemctl daemon-reload sudo systemctl start grafana-server sudo systemctl enable grafana-server sudo systemctl status grafana-server
-
Configure Firewall: Configure the firewall to allow access to Grafana:
sudo firewall-cmd --add-port=3000/tcp --permanent sudo firewall-cmd --reload
-
Access Grafana: Access the Grafana web interface through your browser at
http://your-server-ip:3000
.
2. Installing Grafana using Docker
This method leverages Docker containers for a sandboxed and portable Grafana installation.
Explanation:
Docker provides a containerization platform, allowing you to run Grafana in an isolated environment. This approach simplifies deployment and ensures consistency across different environments. You don’t need to worry about dependencies conflicting with other software on your system.
Steps:
-
Install Docker: If you don’t have Docker installed, install it using the following commands:
sudo dnf install docker -y sudo systemctl start docker sudo systemctl enable docker
-
Pull the Grafana Docker Image: Download the official Grafana image from Docker Hub:
sudo docker pull grafana/grafana
-
Run the Grafana Container: Start a Grafana container with port mapping and volume mounting (optional, for persistent data):
sudo docker run -d -p 3000:3000 --name=grafana -v grafana_data:/var/lib/grafana grafana/grafana
-d
: Runs the container in detached mode (background).-p 3000:3000
: Maps port 3000 on the host to port 3000 in the container.--name=grafana
: Assigns a name to the container.-v grafana_data:/var/lib/grafana
: Creates a named volumegrafana_data
to persist Grafana data across container restarts. If you omit this, the data will be lost when the container is stopped and removed.
-
Verify the container is running:
sudo docker ps
-
Configure Firewall: Configure the firewall to allow access to Grafana:
sudo firewall-cmd --add-port=3000/tcp --permanent sudo firewall-cmd --reload
-
Access Grafana: Access the Grafana web interface through your browser at
http://your-server-ip:3000
.
These alternative methods provide flexibility and cater to different deployment preferences. The YUM repository method is suitable for users who prefer a traditional package management approach, while the Docker method offers containerization benefits for portability and isolation. No matter which method you choose, knowing how to Install Grafana on AlmaLinux 9 is an important skill for any system administrator.