From 15db65933ef34f2bcbc395006e7fafcd3407f7f5 Mon Sep 17 00:00:00 2001 From: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> Date: Thu, 22 Jun 2023 09:26:23 -0700 Subject: [PATCH] Clean up Install Agent Flow on Linux docs (#4226) * First pass at install and uninstall cleanup * Update the install steps * Correct optional to match doc style --- docs/sources/flow/install/linux.md | 108 +++++++++++++++++++++++++---- 1 file changed, 93 insertions(+), 15 deletions(-) diff --git a/docs/sources/flow/install/linux.md b/docs/sources/flow/install/linux.md index 0e2224619c68..fe9f800d2449 100644 --- a/docs/sources/flow/install/linux.md +++ b/docs/sources/flow/install/linux.md @@ -9,9 +9,9 @@ You can install Grafana Agent Flow as a systemd service on Linux. ## Install on Debian or Ubuntu -To install Grafana Agent Flow on Debian or Ubuntu, complete the following steps: +To install Grafana Agent Flow on Debian or Ubuntu, run the following commands in a terminal window. -1. Open a terminal and run the following command to install Grafana's package repository: +1. Import the GPG key and add the Grafana package repository: ```shell sudo mkdir -p /etc/apt/keyrings/ @@ -19,25 +19,54 @@ To install Grafana Agent Flow on Debian or Ubuntu, complete the following steps: echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee /etc/apt/sources.list.d/grafana.list ``` -2. Update the repositories: +1. Update the repositories: ```shell sudo apt-get update ``` -3. Install Grafana Agent Flow: +1. Install Grafana Agent Flow: ```shell sudo apt-get install grafana-agent-flow ``` -## Install on RedHat, RHEL, or Fedora +### Uninstall on Debian or Ubuntu -To install Grafana Agent Flow on RedHat, RHEL, or Fedora, complete the following steps: +To uninstall Grafana Agent Flow on Debian or Ubuntu, run the following commands in a terminal window. -1. Create `/etc/yum.repos.d/grafana.repo` with the following content: +1. Stop the systemd service for Grafana Agent Flow: + + ```shell + sudo systemctl stop grafana-agent-flow + ``` + +1. Uninstall Grafana Agent Flow: + ```shell + sudo apt remove grafana-agent-flow ``` + +1. (Optional) Remove the Grafana repository: + + ```shell + sudo rm -i /etc/apt/sources.list.d/grafana.list + ``` + +## Install on RHEL or Fedora + +To install Grafana Agent Flow on RHEL or Fedora, run the following commands in a terminal window. + +1. Import the GPG key: + + ```shell + wget -q -O gpg.key https://rpm.grafana.com/gpg.key + sudo rpm --import gpg.key + ``` + +1. Create `/etc/yum.repos.d/grafana.repo` with the following content: + + ```shell [grafana] name=grafana baseurl=https://rpm.grafana.com @@ -49,37 +78,86 @@ To install Grafana Agent Flow on RedHat, RHEL, or Fedora, complete the following sslcacert=/etc/pki/tls/certs/ca-bundle.crt ``` -2. Verify that the repository is properly configured using `yum-config-manager`: +1. (Optional) Verify the Grafana repository configuration: + + ```shell + cat /etc/yum.repos.d/grafana.repo + ``` + +1. Install Grafana Agent Flow: + + ```shell + sudo dnf install grafana-agent-flow + ``` + +### Uninstall on RHEL or Fedora + +To uninstall Grafana Agent Flow on RHEL or Fedora, run the following commands in a terminal window: +1. Stop the systemd service for Grafana Agent Flow: + ```shell - yum-config-manager grafana + sudo systemctl stop grafana-agent-flow ``` -3. Install Grafana Agent Flow: +1. Uninstall Grafana Agent Flow: ```shell - sudo yum install grafana-agent-flow + sudo dnf remove grafana-agent-flow + ``` + +1. (Optional) Remove the Grafana repository: + + ```shell + sudo rm -i /etc/yum.repos.d/rpm.grafana.repo ``` ## Install on SUSE or openSUSE -To install Grafana Agent Flow on SUSE or openSUSE, complete the following steps: +To install Grafana Agent Flow on SUSE or openSUSE, run the following commands in a terminal window. -1. Open a terminal and run the following to install Grafana’s package repository: +1. Import the GPG key and add the Grafana package repository: ```shell - wget -q -O gpg.key https://apt.grafana.com/gpg.key + wget -q -O gpg.key https://rpm.grafana.com/gpg.key sudo rpm --import gpg.key sudo zypper addrepo https://rpm.grafana.com grafana ``` -1. Update the repository and install Grafana Agent: +1. Update the repositories: ```shell sudo zypper update + ``` + +1. Install Grafana Agent Flow: + + ```shell sudo zypper install grafana-agent-flow ``` +### Uninstall on SUSE or openSUSE + +To uninstall Grafana Agent Flow on SUSE or openSUSE, run the following commands in a terminal: + +1. Stop the systemd service for Grafana Agent Flow: + + ```shell + sudo systemctl stop grafana-agent-flow + ``` + +1. Uninstall Grafana Agent Flow: + + ```shell + sudo zypper remove grafana-agent-flow + ``` + +1. (Optional) Remove the Grafana repository: + + ```shell + sudo zypper removerepo grafana + ``` + ## Operation guide Grafana Agent Flow is configured as a [systemd][] service.