Installing HOMEBREW and MONGODB on a Mac.

 

 

First off what is Homebrew?

 

Homebrew is the ‘so called’ missing package manager for a Mac.  Linux folks who use Redhat and Ubuntu are used to installing things with yum and other package managers.  Mac typically installs things with point and click packages because it focuses on the GUI.  But this small setup will allow for ease of installation of many packages that are not packaged in a point and click package, in this case we will install MongoDB. (NoSql).

 

Homebrew is a bit unique from Yum, I would check out the Wiki here and do some reading if you want to learn more.

 

https://github.com/Homebrew/homebrew/wiki

 

Ok Lets install Homebrew.

 

We will use a Ruby call to go the install.

 

You will need the basics,

 

•An Intel CPU 1

•OS X 10.5 or higher 2

•Command Line Tools for Xcode: xcode-select –install, https://developer.apple.com/downloads or Xcode 3

•A Bourne-compatible shell for installation (e.g. bash or zsh)

ruby -e “$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)”

 

It will explain what it is going to do, and then do it for you.

 

Some simple brew commands.

 

To update new

 

-> brew update

 

To find out what is outdated

 

-> brew outdated

 

To upgrade everything

 

-> brew upgrade

 

Now everyone is interested in NoSql at the moment, so lets install MongoDB on a mac via Homebrew.

 

-> brew install mongodb

 

Here is the output from my terminal

 

————+

 

shadowmancer$ brew install mongodb

==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/mongodb-2.6.1.mavericks.bottle.tar

######################################################################## 100.0%

==> Pouring mongodb-2.6.1.mavericks.bottle.tar.gz

==> Caveats

To have launchd start mongodb at login:

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 –config /usr/local/etc/mongod.conf

==> Summary


Comments

comments

1 comment for “Installing HOMEBREW and MONGODB on a Mac.

  1. jre
    June 11, 2014 at 12:43 pm

    Pro tip: “ssh-keygen -lf id_dsa.pub” will print the fingerprint. Useful to verify what you have in github for instance!

Leave a Reply

Your email address will not be published. Required fields are marked *