centos安装azure client

  运维
rpm --import https://packages.microsoft.com/keys/microsoft.asc
sh -c 'echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo' 
yum install -y azure-cli
#浏览器打开https://microsoft.com/devicelogin
[root@node01 ~]# az login
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code XXXXXXX to authenticate.
[
  {
    "cloudName": "AzureCloud",
    "id": "XXXX-4bb1-4878-a24e-5cc04b31aa20",
    "isDefault": true,
    "name": "????",
    "state": "Enabled",
    "tenantId": "XXXX-88d3-46c3-85b9-fbc41e240abd",
    "user": {
      "name": "XXXX@qq.com",
      "type": "user"
    }
  }
]

windows版本直接下载安装:https://azurecliprod.blob.core.windows.net/msi/azure-cli-2.0.67.msi

One Reply to “centos安装azure client”

LEAVE A COMMENT

Captcha Code