Thursday, April 4, 2013

Mongo DB installation on Mac


requirement is: Command Line Tools for Xcode": http://connect.apple.com
go to apple.com and download Xcode.

Last login: Mon Feb 11 23:00:42 on ttys000
machost_01:~ raj$ brew update
-sh: brew: command not found

machost_01:~ raj$ brew
-sh: brew: command not found

machost_01:~ raj$ cd /usr/local/

machost_01:local raj$ find Cellar
find: Cellar: No such file or directory

machost_01:local raj$ gcc -v
-sh: gcc: command not found

machost_01:local raj$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0]

machost_01:local raj$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
==> 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/.
==> The following directories will have their group set to admin:
/usr/local/.

Press ENTER to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/.

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
Sorry, try again.
Password:
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/.
==> Downloading and Installing Homebrew...
Failed during: Error: /usr/bin/xcode-select returned unexpected error. init -q
machost_01:local raj$ gcc -v
-sh: gcc: command not found
machost_01:local raj$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1

Press ENTER to continue or any other key to abort
==> Downloading and Installing Homebrew...
remote: Counting objects: 101297, done.
remote: Compressing objects: 100% (43460/43460), done.
remote: Total 101297 (delta 71564), reused 83861 (delta 56957)
Receiving objects: 100% (101297/101297), 15.12 MiB | 2.19 MiB/s, done.
Resolving deltas: 100% (71564/71564), done.
From https://github.com/mxcl/homebrew
 * [new branch]      master     -> origin/master
Checking out files: 100% (2612/2612), done.
HEAD is now at 52b8be1 doctor: make brew link more clear
Warning: Install the "Command Line Tools for Xcode": http://connect.apple.com
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help
machost_01:local raj$ brew doctor
Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools for Xcode" package provided by Apple.
machost_01:local raj$ 
machost_01:local raj$ brew doctor
Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools for Xcode" package provided by Apple.
machost_01:local raj$ 
machost_01:local raj$ 
machost_01:local raj$ 
machost_01:local raj$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
machost_01:local raj$ 
machost_01:local raj$ brew update
Already up-to-date.
machost_01:local raj$ 
machost_01:local raj$ 
machost_01:local raj$ pwd
/usr/local
machost_01:local raj$ brew install mongo
==> Downloading http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.2.3.tgz
######################################################################## 100.0%
==> Caveats
To have launchd start mongodb at login:
    mkdir -p ~/Library/LaunchAgents
    ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
Then to load mongodb now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
Or, if you don't want/need launchctl, you can just run:
    mongod
==> Summary
🍺  /usr/local/Cellar/mongodb/2.2.3-x86_64: 20 files, 171M, built in 45 seconds


No comments: