Commit 77ec7afa by Diana Payton Committed by GitHub

Docs: Update debian.md (#21339)

* Docs: Update debian.md

Simplified the APT install instructions by bundling the commands into one block, added steps in the .deb instructions to refer to new fields on the installation page.

* Update debian.md

* Update debian.md

* Update debian.md

* Update debian.md

* Update debian.md

* Update debian.md
parent 0f0772b6
...@@ -5,7 +5,6 @@ keywords = ["grafana", "installation", "documentation"] ...@@ -5,7 +5,6 @@ keywords = ["grafana", "installation", "documentation"]
type = "docs" type = "docs"
aliases = ["/docs/grafana/latest/installation/installation/debian"] aliases = ["/docs/grafana/latest/installation/installation/debian"]
[menu.docs] [menu.docs]
name = "Install on Ubuntu/Debian"
identifier = "debian" identifier = "debian"
parent = "installation" parent = "installation"
weight = 200 weight = 200
...@@ -13,49 +12,38 @@ weight = 200 ...@@ -13,49 +12,38 @@ weight = 200
# Install on Debian or Ubuntu # Install on Debian or Ubuntu
This page explains how to install Grafana dependencies, download and install Grafana, get the service up and running on your system, and the package details. This page explains how to install Grafana dependencies, download and install Grafana, get the service up and running on your Debian or Ubuntu system, and the installation package details.
**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 "upgrading.md" >}}) for tips and guidance on updating an existing installation. **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 "upgrading.md" >}}) for tips and guidance on updating an existing installation.
## 1. Download and install ## 1. Download and install
We recommend that you run all the listed commands before you download and install Grafana. They might not be necessary on all systems, but if you run them first then you will not be interrupted by dependency errors. You can install Grafana using our official APT repository, by downloading a `.deb` package, or by downloading a binary `.tar.gz` file.
You can install Grafana using our official APT repository, by downloading a `.deb` package, or by using a binary `.tar.gz` file. ### Install from APT repository
On some older versions of Ubuntu and Debian you may need to install the `apt-transport-https` package which is needed to fetch packages over HTTPS. If you install from the APT repository, then Grafana is automatically updated every time you run `apt-get update`.
```bash The APT repository installs the open source edition of Grafana.
sudo apt-get install -y apt-transport-https
```
Install any missing dependencies: #### To install the latest stable release:
```bash ```bash
sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget sudo apt-get install -y software-properties-common wget
```
Add our GPG key to install signed packages:
```bash
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
```
Add this repository for stable releases:
```bash
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main" sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
sudo apt-get update
sudo apt-get install grafana
``` ```
Add this repository if you want beta releases: #### To install the latest beta release:
```bash ```bash
sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb beta main" sudo add-apt-repository "deb https://packages.grafana.com/oss/deb beta main"
```
Update your APT repositories and install Grafana:
```bash
sudo apt-get update sudo apt-get update
sudo apt-get install grafana sudo apt-get install grafana
``` ```
...@@ -77,14 +65,21 @@ echo "deb https://packages.grafana.com/oss/deb beta main" | sudo tee -a /etc/apt ...@@ -77,14 +65,21 @@ echo "deb https://packages.grafana.com/oss/deb beta main" | sudo tee -a /etc/apt
### Install .deb package ### Install .deb package
Go to the [Linux download page](https://grafana.com/grafana/download?platform=linux) for the latest download links. If you install the `.deb` package, then you will need to manually update Grafana for each new version.
If you use ARM, then use the [ARM download page](https://grafana.com/grafana/download?platform=arm) for the latest download links. 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 ```bash
sudo wget <.deb package url>
sudo apt-get install -y adduser libfontconfig1 sudo apt-get install -y adduser libfontconfig1
sudo dpkg -i grafana_<version>_amd64.deb wget <.deb package url>
sudo dpkg -i grafana<edition>_<version>_amd64.deb
``` ```
## Install from binary .tar.gz file ## Install from binary .tar.gz file
...@@ -92,8 +87,7 @@ sudo dpkg -i grafana_<version>_amd64.deb ...@@ -92,8 +87,7 @@ sudo dpkg -i grafana_<version>_amd64.deb
Download the latest [`.tar.gz` file](https://grafana.com/grafana/download?platform=linux) and extract it. The files extract 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. Download the latest [`.tar.gz` file](https://grafana.com/grafana/download?platform=linux) and extract it. The files extract 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 ```bash
sudo wget <tar.gz package url> wget <tar.gz package url>
sudo apt-get install -y adduser libfontconfig1
sudo tar -zxvf <tar.gz package> sudo tar -zxvf <tar.gz package>
``` ```
...@@ -105,20 +99,15 @@ If you installed with the APT repository or `.deb` package, then you can start t ...@@ -105,20 +99,15 @@ If you installed with the APT repository or `.deb` package, then you can start t
### Start the server with systemd ### Start the server with systemd
To start the service using systemd: To start the service and verify that the service has started:
```bash ```bash
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl start grafana-server sudo systemctl start grafana-server
```
Verify that the service has started:
```bash
sudo systemctl status grafana-server sudo systemctl status grafana-server
``` ```
Enable the systemd service so that Grafana starts at boot: Configure the Grafana server to start at boot:
```bash ```bash
sudo systemctl enable grafana-server.service sudo systemctl enable grafana-server.service
...@@ -126,15 +115,10 @@ sudo systemctl enable grafana-server.service ...@@ -126,15 +115,10 @@ sudo systemctl enable grafana-server.service
### Start the server with init.d ### Start the server with init.d
Start Grafana by running: To start the service and verify that the service has started:
```bash ```bash
sudo service grafana-server start sudo service grafana-server start
```
Verify that the service has started:
```bash
sudo service grafana-server status sudo service grafana-server status
``` ```
...@@ -146,7 +130,7 @@ sudo update-rc.d grafana-server defaults ...@@ -146,7 +130,7 @@ sudo update-rc.d grafana-server defaults
### Execute the binary ### 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. The `grafana-server` binary .tar.gz needs the working directory to be the root install directory where the binary and the `public` folder are located.
Start Grafana by running: Start Grafana by running:
```bash ```bash
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment