Install Homebrew

ruby -e "$(curl -fsSL"  

Install Ruby (new version)

brew install ruby  

Install MySQL

brew install mysql  

Create config file at /etc/my.cnf, tell MySQL only listen to localhost.

bind-address =  

Run on boot

mkdir -p ~/Library/LaunchAgents  
cp `brew --prefix mysql`/*mysql*.plist ~/Library/LaunchAgents/  
launchctl load -w ~/Library/LaunchAgents/*mysql*.plist  

Install Redis

brew install redis  

Run on boot

ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents  

Install Apache/PHP

Modify apache config file /etc/apache2/httpd.conf, change Listen 80 to Listen localhost:80. Uncomment LoadModule php5_module libexec/apache2/ to turn on PHP.

Start Apache

sudo apachectl start  

Install phpMyAdmin

Donwload phpMyAdmin and put in /Library/WebServer/Documents
Run http://localhost/setup in browser, to generate basic config file for phpMyAdmin.
Host value change from localhost to
Remove setup directory when complete.
Add $cfg['LoginCookieValidity'] = 999999999; in phpMyAdmin config file, so it won't timeout.