From Mageia wiki
Revision as of 14:17, 9 October 2017 by Inktvis75 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


The command-line tools from Microsoft to manage your Azure environment are not supported for Mageia. Luckily it's relatively easy to install them.

Azure CLI 2

This is the current and preferred utility to manage Azure.

First install the dependencies:

sudo dnf -y install curl make gcc gcc-c++ python-devel lib64ffi-devel lib64openssl-devel 

or

sudo curl make gcc gcc-c++ python-devel lib64ffi-devel lib64openssl-devel

Now you are able to install azure-cli

curl -L https://aka.ms/InstallAzureCli | bash

Just answer the questions to provide the location of the files and add auto-completion to the Bash shell. It is possible however that the customization doesn't work or your bash-prompt looks weird.

Add the following lines to your ~/.bashrc, before the line "source .../azure-cli/az.completion", to fix it:

function nonzero_return() {
	RETVAL=$?
	[ $RETVAL -ne 0 ] && echo "$RETVAL"
}

export PS1="\W\`nonzero_return\` "


Of course, if you want, you may want to customize your prompt to further needs.

Now 'restart' the bash shell and try to login:

exec -l bash -l
az login

azure-xplat-cli

This is actually the older Azure Client, but still in development, and can become handy especially if you're playing with Azure and NodeJS and want to try some things manually first.

Install nodejs:

sudo dnf install nodejs npm

or

sudo urpmi nodejs npm

Use the NodeJS installer to install the software:

sudo npm install -g azure-cli

Try to login:

azure login