First, install Homebrew (if you haven't already)
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
If you have Macports installed, you'll need to move a folder
sudo mv /opt/local ~/macports
You'll probably also need to update your path to load local binaries first. For me, that looked like: