These are the steps I take to set up a new install of OSX Mountain Lion for web development.
Run my fork of Mathias Bynens' legendary script:
curl -sL https://raw.github.com/gist/2279031/hack.sh | sh
You can grab the sub-200MB Command Line Tools installer from Apple Developers.
Note: at time of writing, the "Late July 2012" download doesn't run on Mountain Lion. Luckily, this gist comment has the answer)
3. Install SublimeText 2
4. Install iTerm 2
(read this guide if things go wrong)
Install Homebrew with the following terminal command:
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Then you have to fix some permissions. As Prem Sichanugrist mentions in a recent blog post, "After the upgrade, Apple will set the ownership of your /usr/local folder to root. You can easily fix this by running this command in Terminal:"
sudo chown -R 'whoami' /usr/local
where whoami
is your username.
Now run brew doctor
to check if everything is shipshape. If you did what I did and only install the Command Line Tools (not the whole Xcode), then you'll get two warnings:
Warning: Experimental support for using the "Command Line Tools" without Xcode.
Warning: X11 is not installed.
I'm not sure what the full repercussions of these warnings are, only that some homebrew formulae/packages require them. That being said, I've had no issues on thus far and my webdev environment is pretty standard. If you need these things, chances are you know it, and don't need my advice.
It's as easy as:
brew install git && brew install hub
I also install hub, which facilities working with github from the command line.
a) install oh-my-zsh and change shell to ZSH
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
b) grab my dotfiles:
hub clone /zakkain/dotfiles ~/.dotfiles
and then install them:
cd ~/.dotfiles && rake install
c) install my zsh theme
cp ~/.dotfiles/zsh/themes/moonbase.zsh-theme ~/.oh-my-zsh/themes
d) set up my SSH keys for use with github:
cp -r ~/dropbox/ssh ~/.ssh
chmod 600 ~/.ssh/*.* && ssh-add ~/.ssh/moonbase