How to install mongoDB on MAC
Hi, I’m Kishen Deemud. In this article I will explain you how to install mongoDB on mac.
So let’s go ahead and installed that.
Step 1
Encase you’re thinking to go mongoDB/download-center and want to download the zip file… No, please don’t do that. I have a better solution and better approach of installing things on Mac. And I would like to introduce one thing which encase you are developer, You might be already aware of it.
So it is known as brew.sh . Brew is a service which is package manager and they call it proudly as “The Missing Package Manager for macOS”.
The first thing you have to do is, copy the entire line under the Install Homebrew, and open up your Terminal and just paste it up there. And it’s going to install brew.
Step 2
Now it’s comes to install mongo now. Just give this command to the terminal.
brew install mongo
Now this is gonna take some time to download it and install all these things.
Step 3
Now make a directory using this command
sudo mkdir -p /data/db
Step 4
first identify the name of your computer using
whoami
It will rerun your computer name. [I’m using kish_deemu for this example.]
Now change the ownership of that directory using this command
chown -Rv kish_deemu /data/db
Step 5
Now finally you can run mongod command. Now you can see a lot of things, but these are not errors. This is how server runs.
Step 6
Now open up the new terminal and simply type the mongo command.
As long as you get this > , that means your mongo is working good.
Step 7
So now you can install any MongoDB GUI & IDE like MongoDB Compass, Studio 3T, and speed up tasks like query building, data exploration, import/export and code generation.
Studio 3T |
So I hope you understand my explanation about “How to install mongoDB on MAC”. Thank you!
Comments
Post a Comment