-
-
Save roblambell/af9c71288c34c2ed34d9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From http://www.iyware.com/osx-yosemite-mamp-homebrew-development-setup/ | |
# Apache configuration files are at /usr/local/etc/apache2/2.4 | |
# Web root is at /usr/local/var/www/htdocs | |
# Set date.timezone = Europe/London in /usr/local/etc/php/5.6/php.ini | |
# To configure vhosts uncomment the Virtual hosts Include line in httpd.conf | |
# For mod_rewrite uncomment the LoadModule rewrite_module line in httpd.conf | |
# Add vhosts in extra/httpd-vhosts.conf then `sudo httpd -k restart` | |
# Install Homebrew | |
xcode-select --install | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile | |
brew doctor | |
# Tap Repos | |
brew tap homebrew/dupes | |
brew tap homebrew/versions | |
brew tap homebrew/homebrew-php | |
brew tap homebrew/apache | |
# Verify | |
brew update && brew upgrade | |
# Macintosh | |
brew install git | |
brew install openssl | |
# Apache | |
sudo apachectl stop | |
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null | |
brew install httpd24 --with-privileged-ports --with-brewed-ssl | |
sudo cp -v /usr/local/Cellar/httpd24/2.4.12/homebrew.mxcl.httpd24.plist /Library/LaunchDaemons | |
sudo chown -v root:wheel /Library/LaunchDaemons/homebrew.mxcl.httpd24.plist | |
sudo chmod -v 644 /Library/LaunchDaemons/homebrew.mxcl.httpd24.plist | |
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.httpd24.plist | |
sudo httpd -k start | |
# MySQL | |
brew install mysql | |
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist | |
mysqladmin -u root password "replace_me" | |
# PHP | |
brew install php56 --homebrew-apxs --with-apache --with-homebrew-curl --with-homebrew-openssl --with-phpdbg --with-tidy --without-snmp | |
brew install mcrypt | |
brew install php56-mcrypt | |
chmod -R ug+w /usr/local/Cellar/php56/5.6.7/lib/php | |
pear config-set php_ini /usr/local/etc/php/5.6/php.ini | |
printf '\nAddHandler php5-script .php\nAddType text/html .php' >> /usr/local/etc/apache2/2.4/httpd.conf | |
perl -p -i -e 's/DirectoryIndex index.html/DirectoryIndex index.php index.html/g' /usr/local/etc/apache2/2.4/httpd.conf | |
printf '\nexport PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"' >> ~/.profile | |
# Dev Stuff | |
brew install composer | |
brew install node | |
npm -g install grunt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment