Installing CITS3007 development environment prerequisites on M-series Mac laptops
If you’re running an M-series Mac, the following instructions should allow you to install the Homebrew package manager, the Vagrant development environment manager, and UTM. (We also install VirtualBox; we don’t invoke it directly – it can’t be run on M-series Macs – but we do make use some of VirtualBox tools in later tutorials.)
Install Homebrew on MacOS
Homebrew is a package manager for MacOS, which allows new software packages to be easily installed (and removed). Using it is typically much more straightforward than downloading and configuring DMG (disk image) files.
Open Terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(Note: For Apple Silicon, Homebrew is installed under
/opt/homebrew
.)
Set up Homebrew environment
Append Homebrew’s environment setup to your shell configuration:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
Reload your shell configuration:
source ~/.zshrc
Verify the installation:
brew doctor
Install Vagrant, UTM, and VirtualBox
Install Vagrant and UTM (available as Homebrew “formulas”):
brew install vagrant utm
Install VirtualBox (a GUI application) using the
“--cask
” flag:
brew install --cask virtualbox
(Note: The “brew cask
” command for installing GUI
applications previously was used, but now has been deprecated. Instead,
we now use “brew install --cask
” for GUI apps.)
Install Vagrant plugins
Install the “vagrant_utm” and “vagrant-disksize” plugins, which are used by later steps.
Install “vagrant_utm”:
vagrant plugin install vagrant_utm
Install “vagrant-disksize”:
vagrant plugin install vagrant-disksize
Create your main environment directory
Make a new directory for your development environments:
mkdir ~/CITS3007_development_environment
Tips on using UTM
In CITS3007, we will be using UTM via Vagrant. If you want to experiment with running UTM, however, it’s also possible to run UTM directly. You can find documentation for UTM here, and a “gallery” of predefined UTM virtual machine images here.
This tutorial was written by Steve Beaver, with additions from Arran Stewart.