Follow Jose Gonzalez's included instructions and the portion when you run brew install, run it with the following flags, brew install php54 --with-mysql --with-fpm and then after installing you can run brew info php54 and look for instructions, "If you have installed the formula with --with-fpm"