Mac OS X (Mavericks) にHomebrewとNode.jsをインストールする

Date:  2014/03/31

相棒を新調したゆえ、環境作りですょ。うふふ(^・ェ・^)

$ cat ~/.bash_profile
cat: /Users/XXX/.bash_profile: No such file or directory
あ。ないか。(・ε・`)

プロファイルつくる ( ✧Д✧) カッ!!
$ vi ~/.bash_profile
export PATH=/usr/local/bin:$PATH

ディレクトリつくる ( ✧Д✧) カッ!!
$ sudo mkdir -p /usr/local/bin

Homebrew インストールする ( ✧Д✧) カッ!!
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/.
/usr/local/bin
==> The following directories will have their group set to admin:
/usr/local/.
/usr/local/bin

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/. /usr/local/bin
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> Installing the Command Line Tools (expect a GUI popup):
==> /usr/bin/sudo /usr/bin/xcode-select --install
xcode-select: note: install requested for command line developer tools
Press any key when the installation has completed.
==> Downloading and installing Homebrew...

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help
$

プロファイルをロードする ( ✧Д✧) カッ!!
$ source ~/.bash_profile
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
$ brew -v
Homebrew 0.9.5

うむ ヽ(●゚I゚)人(゚I゚●)ノ

続いて、node.js インストール ( ✧Д✧) カッ!!
$ brew search node
leafnode  node
homebrew/versions/node04      homebrew/versions/node06	    homebrew/versions/node08
$ brew install node 
==> Downloading http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/node/0.10.26
==> make install
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
  /usr/local/Cellar/node/0.10.26: 1121 files, 16M, built in 3.5 minutes
$
$ which node
/usr/local/bin/node
$

うむうむ ヽ(●゚I゚)人(゚I゚●)ノ

POSTED BY : chibiusa IN TECH NOTE