install development environment

Pivotal labs provides a script to automatically install everything using soloist:

http://pivotallabs.com/users/cunnie/blog/articles/1872-got-lion-now-get-everything-else-

some mac osx defautls: https://github.com/mathiasbynens/dotfiles/blob/master/.osx

the following is adapted from http://blog.therubymug.com/blog/2010/05/20/the-install-osx.html

Step 0:

- Uninstall MacPorts!

- clean up .bash_profile & .bashrc from mac ports stuff

Prerequisite OS X Apps:

- Chrome

- Firefox (+ firebug)

- Fluid.app

- Gitx

- SizeUp

- Teleport

- xCode

Snow Leopard Samba Fix2

12

echo "[default]" > ~/Library/Preferences/nsmb.confecho "streams=no" >> ~/Library/Preferences/nsmb.conf

Install homebrew

sudo mkdir /usr/local

OR if ou already have an /usr/local directory, run:

sudo chmod -R +w /usr/local/

sudo chown -R `whoami` /usr/local

Get git

1 brew install git

Install utilities

1 brew install wget proctools ack ctags-exuberant

Install MacVim

1 brew install macvim

See http://code.google.com/p/macvim/

Set up zsh

http://github.com/21croissants/oh-my-zsh

dotfiles, dev folder

http://github.com/21croissants/dotfiles

Remove system gems

123

sudo rm -r /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8sudo gem update --system

sudo gem clean

Install rvm on top of zsh

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

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

-To use ZSH completion for RVM, you can follow these steps:

mkdir -p $HOME/.zsh/rvm cp $rvm_path/scripts/zsh/Completion/_rvm $HOME/.zsh/rvm

Copy the following before oh-my-zsh loads:

# rvm auto completion

fpath=(~/.zsh/rvm $fpath)

Set up some http://rvm.beginrescueend.com/gemsets/initial/ , create a ~/.rvm/gemsets/global.gems

and add gems such as:

rake

mongrel

awesome_print

ruby-debug

looksee

wirble

awesome_print

rak

hirb

launchy

check out http://rbjl.net/40-irbtools-release-the-power-of-irb which takes care of most of them

Install openssl

1 rvm package install openssl

Install the rubies to your heart’s content

1234

rvm install ree -C --enable-shared=yesrvm install 1.8.7 -C --enable-shared=yesrvm install 1.9.2 -C --enable-shared=yesrvm use 1.8.7 --default

1 brew install mysql # Follow instructions

Set up databases with:

mysql_install_db

If this is your first install, automatically load on login with:

cp /usr/local/Cellar/mysql/5.1.49/com.mysql.mysqld.plist ~/Library/LaunchAgents

launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

If this is an upgrade and you already have the com.mysql.mysqld.plist loaded:

launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

cp /usr/local/Cellar/mysql/5.1.49/com.mysql.mysqld.plist ~/Library/LaunchAgents

launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

Note on upgrading:

We overwrite any existing com.mysql.mysqld.plist in ~/Library/LaunchAgents

if we are upgrading because previous versions of this brew created the

plist with a version specific program argument.

To start: launchctl load ~/Library/LaunchAgents/com.mysql.mysqld.plist

To stop: launchctl unload ~/Library/LaunchAgents/com.mysql.mysqld.plist

Or start manually with:

mysql.server start

==> Summary

/usr/local/Cellar/mysql/5.1.49: 219 files, 45M, built in 10.1 minutes

➜ ~mysql mysql_install_db

Installing MySQL system tables...

OK

Filling help tables...

OK

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

/usr/local/Cellar/mysql/5.1.49/bin/mysqladmin -u root password 'new-password'

/usr/local/Cellar/mysql/5.1.49/bin/mysqladmin -u root -h jm-macbook.local password 'new-password'

Alternatively you can run:

/usr/local/Cellar/mysql/5.1.49/bin/mysql_secure_installation

which will also give you the option of removing the test

databases and anonymous user created by default. This is

strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd /usr/local/Cellar/mysql/5.1.49 ; /usr/local/Cellar/mysql/5.1.49/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd /usr/local/Cellar/mysql/5.1.49/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/Cellar/mysql/5.1.49/bin/mysqlbug script!

Postgresql

1 brew install postgresql # Follow instructions

If you get the following error:

FATAL: could not create shared memory segment: Cannot allocate memory

Run this in your terminal window and try the initdb command again.3

12

sudo sysctl -w kern.sysv.shmall=65536sudo sysctl -w kern.sysv.shmmax=16777216

Install global gems

http://github.com/oggy/looksee, awesome_print

mysql& mongrel, ruby-debug, ...

123456789

for x in $(rvm list strings)do rvm use $x@global && gem install mysql --\ --with-mysql-dir=/usr/local \ --with-mysql-config=/usr/local/bin/mysql_config rvm use $x@global && gem install mongrel rake rvm use $x@global && gem install ruby-debug looksee wirble awesome_print rakdone

Note: mongrel did not successfully installed on ruby 1.9.2 :-(

This works:

gem install mongrel --pre

Growl

123456789101112

cd ~/Downloadswget http://growl.cachefly.net/Growl-1.2.dmgopen Growl-1.2.dmgcd /Volumes/Growl-1.2/Extras/growlnotify/# Don't use the install shell script# Use the following:mkdir -p /usr/local/binecho "Creating /usr/local/bin"mkdir -p /usr/local/man/man1echo "Creating /usr/local/man/man1"cp growlnotify /usr/local/bin/growlnotifycp growlnotify.1 /usr/local/man/man1/growlnotify.1

Other libraries

brew install graphviz

brew install imagemagick (get my commit http://github.com/21croissants/homebrew/commit/08d9d5b2cdadb5d0babac5547f020339fc1d3ea8 to fix the formula before)

brew install memcached

You can enabled memcached to automatically load on login with:

cp /usr/local/Cellar/memcached/1.4.5/com.danga.memcached.plist ~/Library/LaunchAgents/

launchctl load -w ~/Library/LaunchAgents/com.danga.memcached.plist

Or start it manually:

/usr/local/bin/memcached

Add "-d" to start it as a daemon.

mongo : http://blog.nofail.de/2010/07/mongo-ruby-driver-mongoid-and-mongomapper/

node : http://www.olympum.com/internet/why-node-js-matters/

Generate a pubkey for that station

12

ssh-keygen -t rsa# Add public key to your github account

1 It may work for Leopard… I just haven’t tried it yet.

2 More info (Thanks Alan Jones for the tip)

3 Found this here