Docs: updates Grafana installation for Red Hat, Fedora, RHEL, SUSE, and OpenSUSE (#65232)

* removes references to CentOS

* starts reorg

* complete restructure

* updates alias

* Update docs/sources/setup-grafana/installation/rpm/index.md

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

* incorporates review feedback

* adds install on suse/opensuse

* updates aliases

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

* removes start server content from both topics; adds link to start server docs in Next steps

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

* incorporates review feedback

* Apply suggestions from code review

* typo fix

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
This commit is contained in:
Christopher Moyer 2023-04-07 08:44:01 -05:00 committed by GitHub
parent cb8a5b2c96
commit fcdbb7a86f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 199 additions and 237 deletions

View File

@ -5,6 +5,7 @@ aliases:
- ../installation/installation/
- ../installation/requirements/
- /docs/grafana/v2.1/installation/install/
- ./rpm/
description: Installation guide for Grafana
title: Install Grafana
weight: 100
@ -22,8 +23,9 @@ Grafana relies on other open source software to operate. For a list of open sour
Grafana supports the following operating systems:
- [Debian / Ubuntu]({{< relref "debian/" >}})
- [RPM-based Linux (Fedora, SUSE/OpenSUSE, RedHat)]({{< relref "rpm/" >}})
- [Debian/Ubuntu]({{< relref "debian/" >}})
- [Red Hat/RHEL/Fedora]({{< relref "redhat-rhel-fedora/" >}})
- [SUSE/OpenSUSE]({{< relref "suse-opensuse/" >}})
- [macOS]({{< relref "mac/" >}})
- [Windows]({{< relref "windows/" >}})

View File

@ -0,0 +1,102 @@
---
description: Install guide for Grafana on Red Hat, RHEL, and Fedora.
title: Install Grafana on Red Hat, RHEL, or Fedora
menuTitle: Redhat, RHEL, or Fedora
weight: 400
---
# Install Grafana on Red Hat, RHEL, or Fedora
This topic explains how to install Grafana dependencies, install Grafana on Redhat, RHEL, or Fedora, and start the Grafana server on your system.
You can install Grafana using a YUM repository, using RPM, or by downloading a binary `.tar.gz` file.
If you install via RPM or the `.tar.gz` file, then you must manually update Grafana for each new version.
## Install Grafana from the YUM repository
If you install from the YUM repository, then Grafana is automatically updated every time you run `sudo yum update`.
| Grafana Version | Package | Repository |
| ------------------ | ------------------ | ------------------------- |
| Grafana Enterprise | grafana-enterprise | `https://rpm.grafana.com` |
| Grafana OSS | grafana | `https://rpm.grafana.com` |
> **Note:** Grafana Enterprise is the recommended and default edition. It is available for free and includes all the features of the OSS edition. You can also upgrade to the [full Enterprise feature set](https://grafana.com/products/enterprise/?utm_source=grafana-install-page), which has support for [Enterprise plugins](https://grafana.com/grafana/plugins/?enterprise=1&utcm_source=grafana-install-page).
To install Grafana using a YUM repository, complete the following steps:
1. Add a file to your YUM repository using the method of your choice.
The following example uses `nano` to add a file to the YUM repo.
```bash
sudo nano /etc/yum.repos.d/grafana.repo
```
```bash
[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
```
1. To prevent beta versions from being installed, add the following exclude line to your `.repo` file.
```bash
exclude=*beta*
```
1. To install Grafana OSS, run the following command:
```bash
sudo yum install grafana
```
1. To install Grafana Enterprise, run the following command:
```bash
sudo yum install grafana-enterprise
```
## Install the Grafana RPM package manually
If you install Grafana manually using YUM or RPM, then you must manually update Grafana for each new version. This method varies according to which Linux OS you are running.
**Note:** The RPM files are signed. You can verify the signature with this [public GPG key](https://rpm.grafana.com/gpg.key).
1. On the [Grafana download page](https://grafana.com/grafana/download), select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only finished releases. If you want to install a beta version, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise** - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- **Open Source** - Functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click **Linux** or **ARM**.
1. Copy and paste the RPM package URL and the local RPM package information from the installation page into the pattern shown below, then run the commands.
```bash
sudo yum install -y <rpm package url>
```
## Install Grafana as a standalone binary
Complete the following steps to install Grafana using the standalone binaries:
1. Navigate to the [Grafana download page](https://grafana.com/grafana/download).
1. Select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only tagged releases. If you want to install a nightly build, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise:** This is the recommended version. It is functionally identical to the open-source version but includes features you can unlock with a license if you so choose.
- **Open Source:** This version is functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click the **Linux** or **ARM** tab on the download page.
1. Copy and paste the code from the installation page into your command line and run.
## Next steps
Refer to [Start the Grafana server]({{< relref "../start-restart-grafana/" >}}).

View File

@ -1,232 +0,0 @@
---
aliases:
- ../../installation/installation/rpm/
- ../../installation/rpm/
description: Grafana Installation guide for RPM-based Linux, such as Centos, Fedora,
OpenSuse, and Red Hat.
title: Install on RPM-based Linux
weight: 400
---
# Install on RPM-based Linux (CentOS, Fedora, OpenSuse, Red Hat)
This topic explains how to install Grafana dependencies, download and install Grafana, get the service up and running on your RPM-based Linux system, and the installation package details.
## Repository migration (November 8th 2022)
From that date, Grafana packages will be served from a new repository (<packages.grafana.com/rpm/{product}> -> <rpm.grafana.com>). The new repository serves, from a single YUM/DNF configuration, all Grafana OSS products, as well as Grafana Enterprise.
The old URLs will still work, serving the content from the new repository, but you may encounter warnings about some repository attributes changing.
## Note on upgrading
While the process for upgrading Grafana is very similar to installing Grafana, there are some key backup steps you should perform. Read [Upgrading Grafana]({{< relref "../../../upgrade-guide/" >}}) for tips and guidance on updating an existing installation.
## 1. Download and install
You can install Grafana from a YUM repository, manually using YUM, manually using RPM, or by downloading a binary `.tar.gz` file.
### Install from YUM repository
If you install from the YUM repository, then Grafana is automatically updated every time you run `sudo yum update`.
| Grafana Version | Package | Repository |
| ------------------ | ------------------ | ------------------------- |
| Grafana Enterprise | grafana-enterprise | `https://rpm.grafana.com` |
| Grafana OSS | grafana | `https://rpm.grafana.com` |
> **Note:** Grafana Enterprise is the recommended and default edition. It is available for free and includes all the features of the OSS Edition. You can also upgrade to the [full Enterprise feature set](https://grafana.com/products/enterprise/?utm_source=grafana-install-page) and has support for [Enterprise plugins](https://grafana.com/grafana/plugins/?enterprise=1&utcm_source=grafana-install-page).
Add a new file to your YUM repo using the method of your choice. The command below uses `nano`.
```bash
sudo nano /etc/yum.repos.d/grafana.repo
```
```bash
[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
```
Optionally, add an exclude line to your `.repo` file to prevent beta versions from being installed.
```bash
exclude=*beta*
```
Install Grafana with one of the following commands
> We recommend all users to install the Enterprise Edition of Grafana, which can be seamlessly upgraded with a Grafana Enterprise [subscription](https://grafana.com/products/enterprise/?utm_source=grafana-install-page).
```bash
sudo yum install grafana
# or
sudo yum install grafana-enterprise
```
### Install manually with YUM
If you install manually with YUM, then you will need to manually update Grafana for each new version. To enable automatic updates for your Grafana installation please use the instructions below to install via our YUM repository.
1. On the [Grafana download page](https://grafana.com/grafana/download), select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only finished releases. If you want to install a beta version, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise** - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- **Open Source** - Functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want enterprise features.
1. Depending on which system you are running, click **Linux** or **ARM**.
1. Copy and paste the code from the installation page into your command line and run. It follows the pattern shown below.
```bash
wget <rpm package url>
sudo yum localinstall <local rpm package>
```
You can also install Grafana using YUM directly:
```bash
sudo yum install <rpm package url>
```
### Install with RPM
If you install with RPM, then you will need to manually update Grafana for each new version. This method varies according to which Linux OS you are running. Read the instructions fully before you begin.
**Note:** The .rpm files are signed, you can verify the signature with this [public GPG key](https://rpm.grafana.com/gpg.key).
1. On the [Grafana download page](https://grafana.com/grafana/download), select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only finished releases. If you want to install a beta version, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise** - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- **Open Source** - Functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click **Linux** or **ARM**.
1. Copy and paste the .rpm package URL and the local .rpm package information from the installation page into the pattern shown below, then run the commands.
**On CentOS, Fedora, Red Hat, or RHEL:**
```bash
sudo yum install initscripts urw-fonts wget
wget <rpm package url>
sudo rpm -Uvh <local rpm package>
```
**On OpenSUSE or SUSE:**
```bash
wget <rpm package url>
sudo rpm -i --nodeps <local rpm package>
```
### Install from binary .tar.gz file
Download the latest [`.tar.gz` file](https://grafana.com/grafana/download?platform=linux) and extract it. The files are extracted into a folder named after the Grafana version that you downloaded. This folder contains all files required to run Grafana. There are no init scripts or install scripts in this package.
```bash
wget <tar.gz package url>
sudo tar -zxvf <tar.gz package>
```
## 2. Start the server
This starts the `grafana-server` process as the `grafana` user, which was created during the package installation. The systemd commands work in most cases, but some older Linux systems might require init.d. The installer should prompt you with the correct commands.
If you installed with an `.rpm` package, then you can start the server using `systemd` or `init.d`. If you installed a binary `.tar.gz` file, then you need to execute the binary.
### Start the server with systemd
To start the service and verify that the service has started:
```bash
sudo systemctl daemon-reload
sudo systemctl start grafana-server
sudo systemctl status grafana-server
```
Configure the Grafana server to start at boot:
```bash
sudo systemctl enable grafana-server
```
> **SUSE or OpenSUSE users:** You might need to start the server with the systemd method, then use the init.d method to configure Grafana to start at boot.
#### Serving Grafana on a port < 1024
{{< docs/shared "systemd/bind-net-capabilities.md" >}}
#### Serving Grafana behind a proxy
When serving Grafana behind a proxy, you need to configure the `http_proxy` and `https_proxy` environment variables.
##### Centos 6
If you are on Centos 6, add the following lines to the `/etc/sysconfig/grafana-server` file.
```
export no_proxy=internal.domain,127.0.0.1
export http_proxy=http://proxy.domain:3128/
export https_proxy=http://proxy.domain:3128/
```
##### Centos 7
If you are on Centos 7, add the following lines to the `/etc/sysconfig/grafana-server` file.
```
http_proxy=http://proxy.domain:3128/
https_proxy=http://proxy.domain:3128/
no_proxy=internal.domain,127.0.0.1
```
### Start the server with init.d
To start the service and verify that the service has started:
```bash
sudo service grafana-server start
sudo service grafana-server status
```
Configure the Grafana server to start at boot:
```bash
sudo /sbin/chkconfig --add grafana-server
```
### Execute the binary
The `grafana-server` binary needs the working directory to be the root install directory where the binary and the `public` folder are located.
Start Grafana by running:
```bash
./bin/grafana-server web
```
## Package details
- Installs binary to `/usr/sbin/grafana-server`
- Copies init.d script to `/etc/init.d/grafana-server`
- Installs default file (environment vars) to `/etc/sysconfig/grafana-server`
- Copies configuration file to `/etc/grafana/grafana.ini`
- Installs systemd service (if systemd is available) name `grafana-server.service`
- The default configuration uses a log file at `/var/log/grafana/grafana.log`
- The default configuration specifies an sqlite3 database at `/var/lib/grafana/grafana.db`
## Next steps
Refer to the [Getting Started]({{< relref "../../../getting-started/build-first-dashboard/" >}}) guide for information about logging in, setting up data sources, and so on.
## Configure Grafana
Refer to the [Configuration]({{< relref "../../configure-grafana/" >}}) page for details on options for customizing your environment, logging, database, and so on.

View File

@ -0,0 +1,84 @@
---
description: Install guide for Grafana on SUSE or OpenSUSE.
title: Install Grafana on SUSE or OpenSUSE
menuTitle: Redhat, RHEL, or Fedora
weight: 450
---
# Install Grafana on SUSE or OpenSUSE
This topic explains how to install Grafana dependencies, install Grafana on SUSE or OpenSUSE and start the Grafana server on your system.
You can install Grafana using a YUM repository, using RPM, or by downloading a binary `.tar.gz` file.
If you install via RPM or the `.tar.gz` file, then you must manually update Grafana for each new version.
## Install Grafana from the YUM repository
If you install from the YUM repository, then Grafana is automatically updated every time you run `sudo zypper update`.
| Grafana Version | Package | Repository |
| ------------------ | ------------------ | ------------------------- |
| Grafana Enterprise | grafana-enterprise | `https://rpm.grafana.com` |
| Grafana OSS | grafana | `https://rpm.grafana.com` |
> **Note:** Grafana Enterprise is the recommended and default edition. It is available for free and includes all the features of the OSS edition. You can also upgrade to the [full Enterprise feature set](https://grafana.com/products/enterprise/?utm_source=grafana-install-page), which has support for [Enterprise plugins](https://grafana.com/grafana/plugins/?enterprise=1&utcm_source=grafana-install-page).
To install Grafana using a YUM repository, complete the following steps:
1. Use zypper to add the grafana repo.
```bash
sudo zypper addrepo https://rpm.grafana.com grafana
```
1. To install Grafana OSS, run the following command:
```bash
sudo zypper install grafana
```
1. To install Grafana Enterprise, run the following command:
```bash
sudo zypper install grafana-enterprise
```
## Install the Grafana RPM package manually
If you install Grafana manually using YUM or RPM, then you must manually update Grafana for each new version. This method varies according to which Linux OS you are running.
**Note:** The RPM files are signed. You can verify the signature with this [public GPG key](https://rpm.grafana.com/gpg.key).
1. On the [Grafana download page](https://grafana.com/grafana/download), select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only finished releases. If you want to install a beta version, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise** - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- **Open Source** - Functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click **Linux** or **ARM**.
1. Copy and paste the RPM package URL and the local RPM package information from the installation page into the pattern shown below, then run the commands.
```bash
sudo zypper install initscripts urw-fonts wget
wget <rpm package url>
sudo rpm -Uvh <local rpm package>
```
## Install Grafana as a standalone binary
Complete the following steps to install Grafana using the standalone binaries:
1. Navigate to the [Grafana download page](https://grafana.com/grafana/download).
1. Select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only tagged releases. If you want to install a nightly build, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise:** This is the recommended version. It is functionally identical to the open-source version but includes features you can unlock with a license if you so choose.
- **Open Source:** This version is functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click the **Linux** or **ARM** tab on the download page.
1. Copy and paste the code from the installation page into your command line and run.
## Next steps
Refer to [Start the Grafana server]({{< relref "../start-restart-grafana/" >}}).

View File

@ -105,9 +105,9 @@ To upgrade Grafana installed from the binary `.tar.gz` package, complete the fol
1. Extract the downloaded package and overwrite the existing files.
### CentOS or RHEL
### RPM or YUM
To upgrade Grafana running on CentOS or RHEL, complete the following steps:
To upgrade Grafana installed using RPM or YUM complete the following steps:
1. In your current installation of Grafana, save your custom configuration changes to a file named `<grafana_install_dir>/conf/custom.ini`.
@ -115,13 +115,19 @@ To upgrade Grafana running on CentOS or RHEL, complete the following steps:
1. Perform one of the following steps based on your installation.
- If you [downloaded an RPM package](https://grafana.com/grafana/download) to install Grafana, then complete the steps documented in [Install on RPM-based Linux]({{< relref "../../setup-grafana/installation/rpm/" >}}) to upgrade Grafana.
- If you [downloaded an RPM package](https://grafana.com/grafana/download) to install Grafana, then complete the steps documented in [Install Grafana on Red Hat, RHEL, or Fedora]({{< relref "../../setup-grafana/installation/redhat-rhel-fedora/" >}}) or [Install Grafana on SUSE or OpenSUSE]({{< relref "../../setup-grafana/installation/suse-opensuse/" >}}) to upgrade Grafana.
- If you used the Grafana YUM repository, run the following command:
```bash
sudo yum update grafana
```
- If you installed Grafana on OpenSUSE or SUSE, run the following command:
```bash
sudo zypper update
```
### Docker
To upgrade Grafana running in a Docker container, complete the following steps: