You can't.
The ESXi CLI, despite looking a bit like RHEL, is actually nothing like RHEL.
I did some serious hacking recently to attempt to get it to run a Python app I wrote (purely out of experimentation reasons). It's so cut-down to be almost impossible to use for running anything other than VMs on.
So what you really want to do is install Ubuntu, or Debian on a VM, then install Ganglia on that.
If you want to use Ganglia to monitor ESXi performance, then you'll probably have to pull the data out of ESXi with SNMP, or something, then squirt it into Ganglia later.