New Dev Environment Setup (by Joe)

willmot edited this page Dec 21, 2012 · 9 revisions

This will set you up with the following:

  • Nginx
  • MySQL
  • Memcached
  • WP-CLI

Install Brew

sudo /usr/bin/ruby -e "$(/usr/bin/curl -fsSL"
echo 'export PATH="$PATH:/usr/local/sbin"' >> ~/.bashrc ; source ~/.bashrc

(See for changes)

Install Xcode command line tools

Get these from apple dev center or install Xcode

Install Nginx

brew install nginx  
curl > /usr/local/etc/nginx/php.conf
rm /usr/local/etc/nginx/nginx.conf
curl > /usr/local/etc/nginx/nginx.conf

sudo nginx

Edit your nginx conf here: /usr/local/etc/nginx/nginx.conf

Install MySQL

brew install mysql
unset TEMDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mysql.server start

Install PHP

brew tap josegonzalez/homebrew-php
brew tap homebrew/dupes
brew install php53 --with-fpm --with-mysql
sed -i "s/user = nobody/user = $USER/g" /usr/local/etc/php/5.3/php-fpm.conf
sed -i "s/group = nobody/group = $USER/g" /usr/local/etc/php/5.3/php-fpm.conf

Install Memcached

brew install memcached
brew install php53-memcache
memcached -d

Install GIT

brew install git

Install WP-CLI

git clone --recursive git:// ~/bin/wp-cli
cd ~/bin/wp-cli
sudo utils/dev-build