How do i install the new microsoft azure cli?



  • Microsoft documentation: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-yum?view=azure-cli-latest

    Install the Microsoft azure software repository key.

    $ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    

    Create a software repository on the local server.

    $ sudo sh -c 'echo -e "[azure-cli]
    name=Azure CLI
    baseurl=https://packages.microsoft.com/yumrepos/azure-cli
    enabled=1
    gpgcheck=1
    gpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'
    

    Install the command line tools.

    $ sudo yum install azure-cli
    Azure CLI                                       5.2 MB/s |  12 MB     00:02
    Last metadata expiration check: 0:00:05 ago on Tue 06 Nov 2019 08:03:20 PM UTC.
    Dependencies resolved.
    ================================================================================
     Package   Arch   Version      Repository                                  Size
    ================================================================================
    Installing:
     azure-cli x86_64 2.0.77-1.el7 azure-cli                                   40 M
    Installing dependencies:
     python3-pip
               noarch 9.0.3-13.el8 rhui-rhel-8-for-x86_64-appstream-rhui-rpms  18 k
     python36  x86_64 3.6.8-2.module+el8.1.0+3334+5cb623d7
                                   rhui-rhel-8-for-x86_64-appstream-rhui-rpms  19 k
    Enabling module streams:
     python36         3.6
    
    Transaction Summary
    ================================================================================
    Install  3 Packages
    
    Total download size: 40 M
    Installed size: 364 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/3): python36-3.6.8-2.module+el8.1.0+3334+5cb  14 kB/s |  19 kB     00:01
    (2/3): python3-pip-9.0.3-13.el8.noarch.rpm       14 kB/s |  18 kB     00:01
    (3/3): azure-cli-2.0.77-1.el7.x86_64.rpm         22 MB/s |  40 MB     00:01
    --------------------------------------------------------------------------------
    Total                                            22 MB/s |  40 MB     00:01
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                        1/1
      Installing       : python36-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64   1/3
      Running scriptlet: python36-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64   1/3
      Installing       : python3-pip-9.0.3-13.el8.noarch                        2/3
      Installing       : azure-cli-2.0.77-1.el7.x86_64                          3/3
      Running scriptlet: azure-cli-2.0.77-1.el7.x86_64                          3/3
      Verifying        : azure-cli-2.0.77-1.el7.x86_64                          1/3
      Verifying        : python3-pip-9.0.3-13.el8.noarch                        2/3
      Verifying        : python36-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64   3/3
    Installed products updated.
    
    Installed:
      azure-cli-2.0.77-1.el7.x86_64
      python3-pip-9.0.3-13.el8.noarch
      python36-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64
    
    Complete!
    

    Check/Verify.

    $ az
    

Log in to reply
 

© Lightnetics 2024