(I will be maintaining this Post with my current setup steps as time moves on)
I’ve been using OSX for Web Development for a while now, initially on a Mac Mini, then migrating to a MacBook Pro and on to a MacBook Air. I thought it was a good idea to get my web development software setup down so I can recall it more easily and get things moving a lot more quickly when I need to re-set everything back up again.
Read on to find out how.
After starting from a fresh OSX Install I usually follow up with a few default web development applications that I have stored on my local server under ‘app_0′ to indicate that they’re the critical.
- XCode – install via the App Store. While it’s not used for web development it is required as it includes vital system tools that others depend on, such as PEAR, Brew/MacPorts. It’s a big old download so it’s worth starting early and make sure you’ve got some elbow room on your locale HD.
- Google Chrome – my browser of choice, I use the regular suite of Firefox, Safari and some VMWare Fusion Virtual Machines for testing
- MAMP Pro - the nuts and bolts Mac Apache, MySQL and PHP setup
- Sublime Text 2 - an awesome text editor. I was using the ubiquitous TextMate for a long time but I shifted over to ST2 and I can honestly say it’s awesome. More on my configuration later.
- Sequel Pro - a useful interface into MySQL when the default phpMyAdmin isn’t enough. It has a very handy ‘Optimise Type’ that I’ll cover.
- Tower - an GIT visual client that’s got some amazing features when you fancy moving away from the Terminal
- CodeKit - I use this as a continuous integration SASS (scss) & Compass compiler for my web projects.
then install the command line tools by running XCode then via
Preferences->Downloads->Command Line Tools->(Install)
Stop losing disk space
Prevent disk space erosion and incorrectly reported free space by disabling Time Machine local snapshots with the following command:
sudo tmutil disablelocal f
OSX Terminal has a nasty habit of dropping characters over SSH and I’ve hunted down a Preferences change that I’ve found to really help fix missing characters over SSH.
Inside Terminal Preferences:
-> Advanced -> Declare Terminal As: (xterm-color)
PEAR is used as to install and manage some PHP tools so it’s worth setting up early. Reference: http://blog.borntocode.com/2011/03/complete-php-dev-environment/
ln -s /Applications/MAMP/bin/php/php5.2.17 /Applications/MAMP/bin/php5
This final ‘mv’ operation fixes a broken default PEAR installation within MAMP
mv /Applications/MAMP/bin/php5/conf/pear.conf /Applications/MAMP/bin/php5/conf/pear.confg.backup
export PATH=/Applications/MAMP/bin/php5/bin:$PATH to ~/.profile
sudo /Applications/MAMP/bin/php5/bin/pear channel-update pear.php.net
sudo /Applications/MAMP/bin/php5/bin/pear upgrade pear
check versions are running
sudo /Applications/MAMP/bin/php5/bin/pear channel-discover pear.phpunit.de
sudo /Applications/MAMP/bin/php5/bin/pear channel-discover components.ez.no
sudo /Applications/MAMP/bin/php5/bin/pear channel-discover pear.symfony-project.com
PHPUnit – testing framework
sudo /Applications/MAMP/bin/php5/bin/pear install phpunit/PHPUnit
Phing – build tool
Phing is a build tool that can save you a whole load of grief by running unit tests (PHPUnit), syntax checks (lint), deployment scripts and much more. All of this automatically checks your development is pretty solid before it gets published.
sudo /Applications/MAMP/bin/php5/bin/pear channel-discover pear.phing.info
sudo /Applications/MAMP/bin/php5/bin/pear install phing/phing
I'll post more on the specific configuration later
GitHub maintains a great page on Set Up Git for Mac, which you should follow before returning here. We’ll be using GIT for semi-automated deployment to your production servers later.
Local Terminal Configuration
Now you have all of the necessary files installed you can go ahead and start configuring your local system.
I keep a GIT repository of all of my hidden ‘dotfiles’ at the link below that you can use as a great starting point for your own config
git clone firstname.lastname@example.org:gamelinchpin/dotfiles.git
Restart Terminal and all the relevant config files should be in the right places.
Hopefully you’ll be starting to get a decent setup and the following posts should help solidify a nice web development environment.
Incoming search terms for the article:
- mac git php mysql development
- mac os x for web development
- free web development tools for mac
- mac web development environment
- web development on os x
- setting up your mac for web development
- setting up a mac for web development
- setting osx up for web development
- set up web development mac
- set up web development environment mac
- set up web development environment
- best os x web development tools
- setup mac web development environment
- sublime text 2 mamp mac
- top web development tools osx
- web developer osx
- web development environment mac
- web development on osx
- web development osx
- web development tools for mac
- php development on mac mini 2012
- osx standard web development tools
- osx git web development
- best web development software php for mac
- how to set up mamp on mac air
- install osx inside terminal
- local web development environment
- local web development mac
- local web development mac osx
- mac mini for web development
- mac os setup web development
- mac os x web development tools
- mac web development
- macbook air web development tools
- macbook web development tools
- mamp git and compass
- os x tools for web developers
- os x website local development
- why macos for web developing