These steps are for Mavericks. Mileage will vary for older versions of Mac OS X but the broad strokes still apply. Google is your friend if you hit a snag. Comments welcome.
Install homebrew.
$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"