Skip to content

Instantly share code, notes, and snippets.

/gist:4329182
Created Dec 18, 2012

Embed
What would you like to do?
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
You can’t perform that action at this time.