Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL

Setup new Mac with OSX Lion from scratch

These commands are good as of 2011-07-27.

Install xcode 4

App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.

iTerm2 http://www.iterm2.com/

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.

Solarized color scheme http://ethanschoonover.com/solarized

I feel there is an advantage in setting all your dev apps to use a consistent color scheme, especially your terminal and text editor/dev environment.

Homebrew http://mxcl.github.com/homebrew/

ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

Note that Xcode is a pre-req for Homebrew

Set shell to ZSH and install oh-my-zsh

brew install wget
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

restart iTerm2

SCM

Git

brew install git

http://help.github.com/mac-set-up-git/

Copy over your SSH Keys from your existing machine if you have them and want to carry over your existing SSH configs.

RVM: http://rvm.beginrescueend.com/rvm/install/

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

.zshrc

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

Start new shell session

Install ruby

rvm install 1.9.2
rvm install 1.8.7
rvm notes

See if there is anything in the rvm notes you need to take action on. As of this writing the compiler needs to be overridden. Create a .gemrc file and add the line gem: --no-ri --no-rdoc

rvm --default 1.8.7
rvmsudo gem install bundler
rvmsudo gem install rails

Pow

curl get.pow.cx | sh

mysql

Get a DMG based and pre-compiled install from http://www.mysql.com/downloads/mysql/

@calvintennant
Copy link

Thanks!

@benjohnson77
Copy link

Homebrew command did not work for me on a fresh install of lion, but going to the mxcl's page to get the latest install command worked great!

/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

@benjohnson77
Copy link

same with RVM command here did not work, but going to RVM site and following commands there worked great.

@Hydraner
Copy link

Homebrew changed location:

ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)

@qtpi
Copy link

qtpi commented Feb 12, 2013

I've updated some information that makes this gist broken. You can find it all in this fork: https://gist.github.com/brandito/4773593

@jupinj
Copy link

jupinj commented Apr 22, 2013

benjohnsonn77 -> hey, do you know how I can get that build - I'm having the same problem with my LionServer box - homebrew won't run. I can't ge that build from github - always returns a 404 -suggestions?

@rictorres
Copy link

nice work, mate! thanks

@yaauie
Copy link

yaauie commented Apr 23, 2014

suggesting a wget piped to sh with the --no-check-certificate flag is terribly irresponsible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment