Flexpool has some excellent steps on how to get started and also on installing MadMAx
https://www.flexpool.io/get-started/xch/XCH-CLI?primaryServer=xch-us-west.flexpool.io
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
cd chia-plotter
git submodule update --init
bash make_release.sh
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.