Brew Mongodb



We know macOS users love using Homebrew, aka Brew, 'the missing package manager for macOS'. Its made life so much simpler when installing both open source and freely available applications. It's also not a centralized package system - it lets anyone create a tap to make their software available. That is why we are very happy to announce that we now have our own official MongoDB Tap which makes it simpler than ever to install the latest MongoDB.

Opening the Tap

The MongoDB Command Line Interface (mongocli) is a tool for managing your MongoDB cloud services, like MongoDB Atlas, MongoDB Cloud Manager, and MongoDB Ops Manager. With the MongoDB CLI, you can quickly interact with your MongoDB deployments from the command line for easier testing and scripting. Remove mongodb that was installed via brew. GitHub Gist: instantly share code, notes, and snippets.

As it’s our own Brew Tap, you need to add it to your list of taps. That’s simply a matter of adding the tap.

Now we’re ready to pour.

Pouring from the Tap

If you want to install the latest full release of MongoDB Community edition complete with tools, it is as simple as running:

Mongodb Client Mac

Brew MongodbBrew

There is one tool which people often want to install on its own, and that’s the MongoDB shell. It’s handy if you are connecting to a server somewhere else on your network or your MongoDB Atlas clusters. If you want just the shell then run:

Other Flavors

Brew Mongodb-database-tools

To make the server simple to start and stop, the brew services command is supported. To start the server just do:

And, of course, to stop it cleanly do:

You can also install older versions of MongoDB using Brew’s version specifier. If you need to install MongoDB 3.6, for example, then you would run:

Brew Mongodb Config

This installs the latest patch level of 3.6 so, as of writing, this would be 3.6.12. There's currently options for 3.4 and 3.6.

Talking about versions, you can start an upgrade from one MongoDB version to another with another quick command:

As with all upgrades, we do recommend you have a backup before running that though. Oh, and if you are wondering how you update the Brew Formula installed on your machine, don't worry, Brew does Formula updates automatically. One final note, the command brew info mongodb-community will give you details on what version you have installed, where it came from and a reminder on how to use those brew services commands to start and stop things.

Brew Mongodb Status

MongodbMongodb tutorial

All Open

If you find it useful, you’ll find more information in the GitHub repository for the MongoDB Formula, https://github.com/mongodb/homebrew-brew. If you want to improve the Formula then we are always ready for pull requests. You can also leave any feedback there via Github issues.

Brew Tap Mongodb Brew

Enjoy the refreshing new way to install MongoDB on your Mac.