In this article, we will have explained the necessary steps to install Grafana on Rocky Linux 8. Before continuing with this tutorial, make sure you are logged in as a user with sudo
privileges. All the commands in this tutorial should be run as a non-root user.
Grafana is an open-source monitoring and alerting tool that is widely used by companies for monitoring, data visualization, and analytics. It provides highly customizable and feature-rich dashboards which can be configured to visualize data from a wide range of data sources. Grafana supports multiple data sources like Prometheus, Graphite, InfluxDB, Elasticsearc, MySQL, PostgreSQL, Zabbix, etc.
Install Grafana on Rocky Linux 8
Step 1. First, before you start installing any package on your Rocky Linux server, we always recommend making sure that all system packages are updated.
sudo dnf install epel-release sudo dnf update sudo dnf upgrade
Step 2. Install Grafana on the Rocky Linux system.
Installing Grafana on your Rocky Linux system is straightforward, we will add the Grafana repository on our local system:
sudo nano /etc/yum.repos.d/grafana.repo
Add the following 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
Save and close then Install Grafana with this command:
sudo dnf update sudo dnf install grafana
After installation completes, start and enable Grafana service using the following command:
sudo systemctl enable --now grafana-server sudo systemctl status grafana-server
Step 3. Configuring Firewall.
By default, the Grafana service is running on the public IP address with port 3000. Now run the following commands to allow the port across the firewall:
sudo firewall-cmd --add-port=3000/tcp --permanent sudo firewall-cmd --reload
Step 4. Accessing Grafana Web UI.
Now, open your web browser and access the Webmin web interface using the URL http://your-server-ip-address:3000
. You will be redirected to the Grafana login page and enter with the default user ‘admin‘ and password ‘admin‘.
That’s all you need to do to install Grafana on Rocky Linux 8. I hope you find this quick tip helpful. For further reading on Grafana’s open-source analytics & monitoring database, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.