Skip to content

Instantly share code, notes, and snippets.

@scribu
Forked from anonymous/gist:4329182
Created March 28, 2013 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scribu/5267112 to your computer and use it in GitHub Desktop.
Save scribu/5267112 to your computer and use it in GitHub Desktop.
# Install Xcode, Command Line Tools, Xquartz (on 10.8)
# In a terminal (probably best to do one thing at a time):
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php54 --with-mysql
chmod -R ug+w /usr/local/Cellar/php54/5.4.7/lib/php
pear config-set php_ini /usr/local/etc/php/5.4/php.ini
PATH="$(brew --prefix josegonzalez/php/php54)/bin:$PATH"
cat >> /etc/apache2/httpd.conf << EOF
LoadModule php5_module /usr/local/Cellar/php54/5.4.7/libexec/apache2/libphp5.so
EOF
brew install php54-mcrypt
brew install php54-apc
brew install php54-xdebug
brew install mysql
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/mysql/5.5.27/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
launchctl start homebrew.mxcl.mysql
cat >> ~/.profile << EOF
PATH="$(brew --prefix josegonzalez/php/php54)/bin:$PATH"
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment