Setting up PHP & MySQL on OS X Yosemite


Homebrew is a package manager for OS X. Install it, as we’ll need it later:

You’ll also need the Xcode command line tools – at least version 6.1. Xcode is available on the Mac App Store as a free download. Don’t forget to start up Xcode at least once after initial installation.

Initially and after every major OS X upgrade, you might need to reinstall the Xcode command line tools and accept the license aggreement:

Also, don’t forget to create this missing symlink after upgrading to a new major OSX version:

Once Homebrew is set up and you want to upgrade outdated packages, run:

Remember to also run brew update && brew upgrade after upgrading to a new major OS X version.

List all installed packages:

You should never be required to run brew as root using sudo!

Read More