Flexpool has some excellent steps on how to get started and also on installing MadMAx
The one caveat is that on Ubuntu 20.04 you’ll need to install cmake
sudo apt install cmake
Then you can install and run MadMAx with
git clone https://github.com/madMAx43v3r/chia-plotter
git submodule update --init
sudo mv build/chia_plot /usr/bin
Now you can create a plot by running the chia_plot command.
chia_plot -n 1 -t /path/to/tmp/ -d /chia/destination -c p2singletonaddressorpoolcontractaddress -f biglongfarmerpublickey
Note that if you are plotting on a harvester that the p2 singleton or the pool contract address does not have to be on the harvester system. You can grab it off the main node and then use the address on the machine plotting.