HomeInstallation

Install MongoDB Mac Os – step by step guide in 2 minutes

Like Tweet Pin it Share Share Email

This guide helps you to install MongoDB in MAC OS. This is just a 2 minutes step by step guide.

To make your task easy if have also created one video. You can find video link for MongoDB installation in Mac Os in the last of this article.

Step by step guide to install MongoDB in Mac Os

Now lets start installation of MongoDB in Mac Os. Please read this article till end to learn MongoDB installation.

Once you completed this article you should be able to –

  1. Do MongoDB installation in Mac Os
  2. Start MongoDB services in Mac Os
  3. Stop MongoDB services in Mac Os
Install MongoDB in Mac OS
Step by step guide to install MongoDB in Mac Os

Before you start MongoDB installation please open terminal in your Mac.

Now please find the commands used for MongoDB installation in MAC OS.

  1. First run “cd~”. It will point you to the root directory.
  2. Now run “brew update”. It will update brew libraries in your system.
  3. Install xcode by running “xcode-select –install”. It will install xcode in your system. In case xcode is already present. It will just update it.
  4. Tap brew to MongoDB. For doing this you need to run “brew tap mongodb/brew”.
  5. We recommend to install node before you start installing MongoDB. Run “brew install node”.
  6. Now run this command – “brew install [email protected]. This is the game changer command. It will install MongoDB in your system. Once you run this command it takes 10-15 seconds to complete.
  7. Afterwards please install MongoDB tools – “brew install mongodb-database-tools”.
  8. Once MongoDB tools installed please run – “brew services start [email protected].
  9. Once MongoDB services starts, open MongoDB shell by executing this command – “mongosh”.
  10. Now you may be intereted to see list of databases. MongoDB command to display list of all databases – “show dbs”.
  11. Command to close MongoDB shell – “quit()”.
  12. Next step is to verify MongoDB installation files. Change the directory to “cd /usr/local/bin”.
  13. Now type “ls” command to see the list of files inside bin folder.
  14. Hope you are able to see all the installed MongoDB files.
  15. Now you can stop MongoDB services. Run “brew services stop [email protected]. You can stop mongodb server using this command.

So friends hope you enjoyed this video. Now you are able to install MongoDB in MAC OS operating systems.

Please find YouTube guide to install MongoDB services in Mac Os.

You can watch our YouTube video to learn MongoDB installation in Mac Os.

References :

You can find a very good reference on official website of MongoDB to learn installation.

Conclusion :

Thanks for reading this article. Hope you are able to install MongoDB in your Mac system. Also you should be able to strat and stop MongoDB services using Mac Os terminal.

In case yu are facing any issue please drop a comment so that we can support you.

Comments (0)

Leave a Reply

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