How to install Grafana on Oracle Linux 9.2
To install Grafana on Oracle Linux 9.2
Introduction :
Grafana is a multi-platform open-source analytics and interactive visualization web application that provides charts, graphs, and alerts for the web when connected to supported data sources. You can visualize results from multiple data sources simultaneously.
Installation Steps:
Step1: Check the Oracle Linux Version by using the below command
[root@linuxhelp ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="9.2"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="9.2"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Oracle Linux Server 9.2"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:9:2:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 9"
ORACLE_BUGZILLA_PRODUCT_VERSION=9.2
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=9.2
Step 2: Add the Grafana Yum Repository by using the below command
[root@linuxhelp ~]# vim /etc/yum.repos.d/grafana.repo
[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
Step 3: When repository for Grafana has been configured, Grafana can be easily installed by running the below command
[root@linuxhelp ~]# dnf -y install grafana
grafana 573 B/s | 629 B 00:01
grafana 1.6 kB/s | 2.4 kB 00:01
Importing GPG key 0x10458545:
Userid : "Grafana Labs <engineering@grafana.com>"
Fingerprint: B53A E77B ADB6 30A6 8304 6005 963F A277 1045 8545
From : https://packages.grafana.com/gpg.key
grafana 9.0 MB/s | 40 MB 00:04
Last metadata expiration check: 0:00:25 ago on Wednesday 13 September 2023 07:08:43 AM.
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
grafana x86_64 10.1.1-1 grafana 96 M
Transaction Summary
================================================================================
Install 1 Package
Total download size: 96 M
Installed size: 357 M
Downloading Packages:
grafana-10.1.1-1.x86_64.rpm 19 MB/s | 96 MB 00:04
--------------------------------------------------------------------------------
Total 19 MB/s | 96 MB 00:04
grafana 4.0 kB/s | 2.4 kB 00:00
Importing GPG key 0x10458545:
Userid : "Grafana Labs <engineering@grafana.com>"
Fingerprint: B53A E77B ADB6 30A6 8304 6005 963F A277 1045 8545
From : https://packages.grafana.com/gpg.key
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : grafana-10.1.1-1.x86_64 1/1
Running scriptlet: grafana-10.1.1-1.x86_64 1/1
### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable grafana-server.service
### You can start grafana-server by executing
sudo /bin/systemctl start grafana-server.service
POSTTRANS: Running script
Verifying : grafana-10.1.1-1.x86_64 1/1
Installed:
grafana-10.1.1-1.x86_64
Complete!
Step 4: To Know the Package Information use the below command.
[root@linuxhelp ~]# rpm -qi grafana
Name : grafana
Version : 10.1.1
Release : 1
Architecture: x86_64
Install Date: Wednesday 13 September 2023 07:10:00 AM
Group : default
Size : 374114481
License : AGPLv3
Signature : RSA/SHA512, Thursday 31 August 2023 11:29:08 PM, Key ID 963fa27710458545
Source RPM : grafana-10.1.1-1.src.rpm
Build Date : Thursday 31 August 2023 11:28:18 PM
Build Host : localhost
Relocations : /
Packager : contact@grafana.com
Vendor : "Grafana Labs"
URL : https://grafana.com
Summary : Grafana
Description :
Grafana
Step 5: Grafana service is managed by systemd. Start the service and enable it to start on boot by using the below command.
[root@linuxhelp ~]# systemctl enable --now grafana-server.service
Synchronizing state of grafana-server.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable grafana-server
Created symlink /etc/systemd/system/multi-user.target.wants/grafana-server.service → /usr/lib/systemd/system/grafana-server.service.
Step 6: The default port used is 3000. If you have another process using this port, you’ll need to set custom port in Grafana configuration file
/etc/grafana/grafana.ini
http_port = 3000
Step 7: To know the status of Grafana use the below command.
[root@linuxhelp ~]# systemctl status grafana-server.service
● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; p>
Active: active (running) since Wed 2023-09-13 07:11:20 IST; 37s ago
Docs: http://docs.grafana.org
Main PID: 6584 (grafana)
Tasks: 14 (limit: 21470)
Memory: 88.5M
CPU: 10.791s
CGroup: /system.slice/grafana-server.service
└─6584 /usr/share/grafana/bin/grafana server --config=/etc/grafana>
Sep 13 07:11:20 linuxhelp grafana[6584]: logger=modules t=2023-09-13T07:11:20.5>
Sep 13 07:11:20 linuxhelp grafana[6584]: logger=ngalert.state.manager t=2023-09>
Sep 13 07:11:20 linuxhelp grafana[6584]: logger=ngalert.state.manager t=2023-09>
Sep 13 07:11:20 linuxhelp grafana[6584]: logger=ngalert.scheduler t=2023-09-13T>
Sep 13 07:11:20 linuxhelp grafana[6584]: logger=ticker t=2023-09-13T07:11:20.50>
Sep 13 07:11:20 linuxhelp grafana[6584]: logger=grafanaStorageLogger t=2023-09->
Sep 13 07:11:20 linuxhelp grafana[6584]: logger=ngalert.multiorg.alertmanager t>
Sep 13 07:11:20 linuxhelp systemd[1]: Started Grafana instance.
Sep 13 07:11:20 linuxhelp grafana[6584]: logger=grafana.update.checker t=2023-0>
Sep 13 07:11:20 linuxhelp grafana[6584]: logger=plugins.update.checker t=2023-0>
Step 8: If you have a running firewalld service, allow port 3000 for access the dashboard from the network
[root@linuxhelp ~]# firewall-cmd --add-port=3000/tcp --permanent
success
[root@linuxhelp ~]# firewall-cmd --reload
success
Step 9: Access Grafana as shown in the below images Grafana web dashboard is accessible on http://[Server IP|Hostname]:3000
The default logins are:
username: admin
Password: admin
Step 10: Change admin password in the next window as shown in the below image.
Step 11: This is the Dashboard of Grafana
Conclusion
We have reached the end of this article. In this guide, we have walked you through the steps required to Install Grafana on Oracle Linux 9.2. Your feedback is much welcome.
Comments ( 0 )
No comments available