RPM-based Installation
This guide covers installing Grafana on RPM-based Linux distributions (RHEL, Fedora, CentOS) using the YUM/DNF repository or standalone RPM packages.Installation Methods
You can install Grafana on RPM-based systems using:- YUM/DNF repository (recommended): Automatic updates via
dnf update - RPM package: Manual installation from downloaded package
- Standalone binary: Manual installation from tarball
Install from RPM Repository
Installing from the RPM repository enables automatic updates when you rundnf update or yum update.
Available Repositories
| Edition | Package | Repository |
|---|---|---|
| Grafana Enterprise | grafana-enterprise | https://rpm.grafana.com |
| Grafana Enterprise (Beta) | grafana-enterprise | https://rpm-beta.grafana.com |
| Grafana OSS | grafana | https://rpm.grafana.com |
| Grafana OSS (Beta) | grafana | https://rpm-beta.grafana.com |
Grafana Enterprise is the recommended edition. It’s free and includes all OSS features, with the option to upgrade to the full Enterprise feature set.
sudo tee /etc/yum.repos.d/grafana.repo <<EOF
[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
EOF
Install from RPM Package
Manual installation using RPM packages requires you to manually update Grafana for each new version.RPM files are signed and can be verified with the public GPG key.
Visit the Grafana download page and:
Install as Standalone Binary
For manual installation with full control over file locations:Download the tarball from the Grafana download page and extract it:
[Unit]
Description=Grafana Server
After=network.target
[Service]
Type=simple
User=grafana
Group=users
ExecStart=/usr/local/grafana/bin/grafana server --config=/usr/local/grafana/conf/grafana.ini --homepath=/usr/local/grafana
Restart=on-failure
[Install]
WantedBy=multi-user.target
Start Grafana Server
Using systemd
Start the Grafana server:Using init.d
Start Grafana:Configuration
After installation, Grafana uses these default paths:| Path | Description |
|---|---|
/etc/grafana/grafana.ini | Configuration file |
/var/lib/grafana | Data directory (SQLite database, plugins) |
/var/log/grafana | Log files |
/usr/share/grafana | Installation directory |
/etc/grafana/provisioning | Provisioning directory |
/etc/sysconfig/grafana-server | Environment variables |
Environment Variables File
The systemd service reads environment variables from/etc/sysconfig/grafana-server:
Systemd Service Configuration
The Grafana systemd service (/usr/lib/systemd/system/grafana-server.service) includes:
- Runs as non-root
grafanauser - Dependencies: PostgreSQL, MariaDB, MySQL, InfluxDB (waits for them if present)
- Security hardening with restricted capabilities
- File open limit: 10,000
- Stop timeout: 20 seconds
- Automatic restart on failure
Firewall Configuration
If you have firewalld enabled, allow traffic on port 3000:SELinux Configuration
If SELinux is enforcing, you may need to configure it for Grafana:Access Grafana
After starting the server, access Grafana:- Open your browser to
http://localhost:3000 - Sign in with default credentials:
- Username:
admin - Password:
admin
- Username:
- Change the password when prompted
Uninstall Grafana
Troubleshooting
View logs
Check service status
Verify installation
Port already in use
If port 3000 is already in use, edit/etc/grafana/grafana.ini:
Check firewall
Check SELinux status
Next Steps
- Configure data sources
- Set up authentication (LDAP, OAuth, SAML)
- Configure SMTP for email notifications
- Set up provisioning for dashboards and data sources
- Configure an external database (MySQL or PostgreSQL)