NOTE ON DRUSH: Use composer do not trust brew install drush NVM: Install via brew (JF) or curl (AK) -- DON'T MESS UP GLOBAL SETTING ALSO: This is outdated ... cask seems to have integrated with brew ...
#Getting OSX Ready...#
Already have MySQL installed from a previous DMG or GUI installer? Follow the instructions at https://coderwall.com/p/os6woq/uninstall-all-those-broken-versions-of-mysql-and-re-install-it-with-brew-on-mac-mavericks to blast it away, backing up any data first.
Already have Apache running in OSX? You can turn it off since we'll be setting up Nginx below, or leave it running on port 80 – it won't affect what we're doing here.
Already have Homebrew installed? Run
brew doctor
and follow the free advice.
Ensure Xcode Command Line Tools are installed
xcode-select --install
Install Homebrew / Cask (if you don't already have them):
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/cask
brew install brew-cask
Install apps via Homebrew / Cask:
brew tap homebrew/dupes
brew tap homebrew/php
brew install curl git node mysql freetype jpeg libpng gd zlib mongodb imagemagick
brew install --without-apache --with-fpm --with-mysql php55
brew install --without-apache --with-fpm --with-mysql --without-snmp php53
brew install mcrypt php55-mcrypt php53-mcrypt php55-yaml php55-imagick
brew cask install sequel-pro sourcetree launchrocket robomongo
Install NPM modules:
npm install -g nodemon grunt-cli bower serve
Configure PHP:
curl -fsSL https://gist.github.com/jasonfroderman/9c67b940181b5431b717/raw | sudo tee /usr/local/etc/php/5.5/php.ini > /dev/null
curl -fsSL https://gist.github.com/jasonfroderman/9c67b940181b5431b717/raw | sudo tee /usr/local/etc/php/5.3/php.ini > /dev/null
curl -fsSL https://gist.github.com/jasonfroderman/a4d7ed79fcc042f2fa35/raw | sudo tee /usr/local/etc/php/5.3/php-fpm.conf > /dev/null
mkdir /var/www/_mailqueue
curl -fsSL https://gist.github.com/jasonfroderman/1f8f000355d87d0e1120/raw | sudo tee /var/www/_mailqueue/_sendmail.php > /dev/null
If you wish to swap the PHP you use on the command line, you should add the following to
~/.bashrc
,~/.zshrc
,~/.profile
or your shell's equivalent configuration file:export PATH="$(brew --prefix homebrew/php/php55)/bin:$PATH"
Configure MySQL / Sequel Pro
First, run mysql_secure_installation
from terminal to tighten things up. By default, root has no password. You should set one, and should also follow the default Y/n options (choosing Y
) to disallow remote login, remove test tables, etc.
To connect Sequel Pro to the MySQL server now running in OSX, use the following connection settings:
Type: Standard
MySQL Host: 127.0.0.1
Username: root
Password: (whatever password you gave root)
Database: (blank)
Port: 3306
LaunchRocket:
Open up System Preferences and select LaunchRocket. Click the "Scan Homebrew" button and configure which services you'd like to start now, at boot, etc. If any services aren't found as expected, you can load those services' plist files by hand from the following locations:
- PHP 5.3: /usr/local/Cellar/php53/5.3.29/homebrew.mxcl.php53.plist
- PHP 5.5: /usr/local/opt/php55/*.plist
- MySQL: /usr/local/opt/mysql/*.plist
- Nginx: /usr/local/opt/nginx/*.plist
#All done!##
MySQL / MongoDB
You can launch Sequel Pro or Robomongo to browse MySQL and MongoDB databases, respectively.
Spin up vanilla servers whenever you want
You can use the npm module serve to spin up a vanilla server form any directory by typing serve
.
NPM
Use NPM (http://npmjs.org/) to install Node.js modules to any project.
Grunt
Use Grunt (http://gruntjs.com/) to automate any tasks on a project, such as compiling SASS.
Bower
Use Bower (http://bower.io/) to install front-end dependencies to any project.
Nodemon
Use nodemon some-app.js
to launch a Node.js server on a given script. The script will be monitored for changes and restarted automatically.
brew cask install google-chrome && brew cask install alfred && brew cask install sequel-pro && brew cask install caffeine && brew cask install evernote && brew cask install slack && brew cask install sublime-text && brew cask install cheatsheet && brew cask install sourcetree && brew cask install dash && brew cask install dropbox && brew cask install transmit && brew cask install inkscape && brew install homebrew/php/drush && brew install nvm