I work with Microsoft Azure frequently at my work. And I like using the Azure CLI. One day I was reading the documentation and thought why not try install it on FreeBSD? And that is exaclty what I did and below you can read how I did it.
The following requirements have to be in place to be able to implement what is described in this post:
The Azure CLI needs the following packages to work:
To install these packages issue the following commands:
# pkg install curl # pkg install bash # pkg install python27 # rehash
And then you need to make the following link:
# ln -s /usr/local/bin/python2.7 /usr/local/bin/python
The Azure CLI is installed using the folloing command:
# curl -L https://aka.ms/InstallAzureCli | bash
This command downloads the Azure CLI install script and 2 questions are asked:
==> In what directory would you like to place the install? \ (leave blank to use '/home/user/lib/azure-cli'): \ /usr/local/lib/azure-cli ==> In what directory would you like to place the 'az' executable? \ (leave blank to use '/root/bin'): /usr/local/sbin
Then after a couple of minutes you have installed the Azure CLI on your FreeBSD box!
Some (other) resources about this subject: