|
1 | 1 | --- |
2 | | -title: Install azdata with installer on Linux |
3 | | -titleSuffix: |
4 | | -description: Learn how to install the azdata tool with the installer (Linux). |
| 2 | +title: Install azdata with apt |
| 3 | +description: Learn how to install the azdata tool with apt. |
5 | 4 | author: MikeRayMSFT |
6 | 5 | ms.author: mikeray |
7 | 6 | ms.reviewer: mihaelab |
8 | | -ms.date: 01/07/2020 |
| 7 | +ms.date: 09/30/2020 |
9 | 8 | ms.topic: conceptual |
10 | 9 | ms.prod: sql |
11 | 10 | ms.technology: big-data-cluster |
12 | 11 | --- |
13 | 12 |
|
14 | 13 | # Install `azdata` with apt |
15 | 14 |
|
16 | | -[!INCLUDE[SQL Server 2019](../../includes/applies-to-version/azdata.md)] |
| 15 | +[!INCLUDE[azdata](../../includes/applies-to-version/azdata.md)] |
17 | 16 |
|
18 | | -This article describes how to install `azdata` on Linux. Before these package managers were available, the installation of `azdata` required `pip`. |
| 17 | +For Linux distributions with `apt` there is a package for the `azdata-cli`. The CLI package has been tested on Linux versions which use `apt`: |
19 | 18 |
|
20 | | -[!INCLUDE [azdata-package-installation-remove-pip-install](../../includes/azdata-package-installation-remove-pip-install.md)] |
21 | | - |
22 | | -## <a id="linux"></a>Install `azdata` for Linux |
| 19 | +- Ubuntu 16.04, Ubuntu 18.04 |
23 | 20 |
|
24 | | -`azdata` installation package is available for Ubuntu with `apt`. |
| 21 | +[!INCLUDE [azdata-package-installation-remove-pip-install](../../includes/azdata-package-installation-remove-pip-install.md)] |
25 | 22 |
|
26 | | -### <a id="azdata-apt"></a>Install `azdata` with apt (Ubuntu) |
| 23 | +## Install with apt |
27 | 24 |
|
28 | | ->[!NOTE] |
29 | | ->The `azdata` package does not use the system Python, rather installs its own Python interpreter. |
| 25 | +>[!IMPORTANT] |
| 26 | +> The RPM package of the `azdata-cli` depends on the python3 package. On your system, this may be a Python version which predates the requirement of *Python 3.6.x*. If this poses an issue for you, find a replacement python3 package or follow the manual install instructions that use [`pip`](../install/deploy-install-azdata-pip.md). |
30 | 27 |
|
31 | | -1. Get packages needed for the install process: |
| 28 | +1. Install dependencies necessary to install `azdata-cli`. |
32 | 29 |
|
33 | | - ```bash |
34 | | - sudo apt-get update |
35 | | - sudo apt-get install gnupg ca-certificates curl wget software-properties-common apt-transport-https lsb-release -y |
36 | | - ``` |
| 30 | + ```bash |
| 31 | + sudo apt-get update |
| 32 | + sudo apt-get install gnupg ca-certificates curl wget software-properties-common apt-transport-https lsb-release -y |
| 33 | + ``` |
37 | 34 |
|
38 | | -2. Download and install the signing key: |
| 35 | +2. Import the Microsoft repository key. |
39 | 36 |
|
40 | | - ```bash |
41 | | - curl -sL https://packages.microsoft.com/keys/microsoft.asc | |
42 | | - gpg --dearmor | |
43 | | - sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null |
44 | | - ``` |
| 37 | + ```bash |
| 38 | + curl -sL https://packages.microsoft.com/keys/microsoft.asc | |
| 39 | + gpg --dearmor | |
| 40 | + sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null |
| 41 | + ``` |
45 | 42 |
|
46 | | -3. Add the `azdata` repository information. |
| 43 | +3. Create local repository information. |
47 | 44 |
|
48 | 45 | For Ubuntu 16.04 client run: |
| 46 | + |
49 | 47 | ```bash |
50 | 48 | sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/prod.list)" |
51 | 49 | ``` |
52 | 50 |
|
53 | 51 | For Ubuntu 18.04 client run: |
| 52 | + |
54 | 53 | ```bash |
55 | 54 | sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/prod.list)" |
56 | 55 | ``` |
57 | 56 |
|
58 | | -4. Update repository information and install `azdata`: |
| 57 | + For Ubuntu 20.04 client run: |
59 | 58 |
|
60 | 59 | ```bash |
61 | | - sudo apt-get update |
62 | | - sudo apt-get install -y azdata-cli |
| 60 | + sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/prod.list) |
63 | 61 | ``` |
64 | 62 |
|
65 | | -5. Verify installation: |
| 63 | +4. Install `azdata-cli`. |
66 | 64 |
|
67 | | - ```bash |
68 | | - azdata --version |
69 | | - ``` |
| 65 | + ```bash |
| 66 | + sudo apt-get update |
| 67 | + sudo apt-get install -y azdata-cli |
| 68 | + ``` |
| 69 | +
|
| 70 | +## Verify install |
70 | 71 |
|
71 | | -### Update |
| 72 | +```bash |
| 73 | +azdata |
| 74 | +azdata --version |
| 75 | +``` |
| 76 | +
|
| 77 | +## Update |
72 | 78 |
|
73 | | -Upgrade `azdata` only: |
| 79 | +Update the `azdata-cli` with the `apt-get update` and `apt-get install` commands. |
74 | 80 |
|
75 | 81 | ```bash |
76 | 82 | sudo apt-get update && sudo apt-get install --only-upgrade -y azdata-cli |
77 | 83 | ``` |
78 | 84 |
|
79 | | -### Uninstall |
| 85 | +## Uninstall |
80 | 86 |
|
81 | | -1. Uninstall with apt-get remove: |
82 | | - |
83 | | - ```bash |
84 | | - sudo apt-get remove -y azdata-cli |
85 | | - ``` |
| 87 | +1. Remove the package from your system. |
86 | 88 |
|
87 | | -2. Remove the `azdata` repository information: |
| 89 | + ```bash |
| 90 | + sudo apt-get remove -y azdata-cli |
| 91 | + ``` |
88 | 92 |
|
89 | | - >[!NOTE] |
90 | | - >This step is not needed if you plan on installing `azdata` in the future |
| 93 | +2. Remove the repository information if you do not plan to reinstall `azdata-cli`. |
91 | 94 |
|
92 | | - ```bash |
93 | | - sudo rm /etc/apt/sources.list.d/azdata-cli.list |
94 | | - ``` |
| 95 | + ```bash |
| 96 | + sudo rm /etc/apt/sources.list.d/azdata-cli.list |
| 97 | + ``` |
95 | 98 |
|
96 | | -3. Remove the signing key: |
| 99 | +3. Remove the repository key. |
97 | 100 |
|
98 | | - ```bash |
99 | | - sudo rm /etc/apt/trusted.gpg.d/dpgswdist.v1.asc.gpg |
100 | | - ``` |
| 101 | + ```bash |
| 102 | + sudo rm /etc/apt/trusted.gpg.d/dpgswdist.v1.asc.gpg |
| 103 | + ``` |
101 | 104 |
|
102 | | -4. Remove any unneeded dependencies that were installed with Azdata CLI: |
| 105 | +4. Remove dependencies no longer required. |
103 | 106 |
|
104 | | - ```bash |
105 | | - sudo apt autoremove |
106 | | - ``` |
| 107 | + ```bash |
| 108 | + sudo apt autoremove |
| 109 | + ``` |
107 | 110 |
|
108 | 111 | ## Next steps |
109 | 112 |
|
|
0 commit comments