Skip to content

Commit

Permalink
Clean up Install Agent Flow on Linux docs (grafana#4226)
Browse files Browse the repository at this point in the history
* First pass at install and uninstall cleanup

* Update the install steps

* Correct optional to match doc style
  • Loading branch information
clayton-cornell committed Jun 22, 2023
1 parent 23320d9 commit 15db659
Showing 1 changed file with 93 additions and 15 deletions.
108 changes: 93 additions & 15 deletions docs/sources/flow/install/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,64 @@ 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/
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null
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
Expand All @@ -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.
Expand Down

0 comments on commit 15db659

Please sign in to comment.