How To Install MongoDB On Mac (2 Min) | Without Homebrew Using Terminal



How To Install MongoDB On Mac (2 Min) | Without Homebrew Using Terminal

How To Install MongoDB On Mac (2 Min) | Without Homebrew Using Terminal

In this tutorial, you’ll learn how to install MongoDB on a mac (Mac OS).


Facebook: https://www.facebook.com/GokceDBsql

Video Transcript:

Hi guys, this is Abhi from Gokcedb. In this video, you’re going to learn how to install MongoDB on a MAC. Let’s start by going to the downloads page for the MongoDB community server and then hitting the download button.

Next, double-click on the TGZ file to extract the contents and open up your terminal. I’m going to use the MV command. To move this folder to my dropbox directory then change the name of this folder to MongoDB.

Next use the CD command to go inside the MongoDB folder then uses the MKDIR to create a new data directory. Inside the data directory, create a DB folder then go back to the bin folder under MongoDB. To run the MongoDB server, we need to execute the MongoD script.

Make sure to give this script the necessary permissions by going to security and privacy preferences and clicking on allow anyway. We also need to pass the DB path parameter with the location of our data DB folder. Looks like the command worked and the server came up without any issues.

To exit, hit control C. Next, I’m going to create a log folder where we can redirect server logs. This time, when I bring the server up I’m going to redirect all the server logs under the logs folder.

I’m also using 2 greater than ampersand 1 to redirect all the errors to the same log followed by an ampersand which means running this command in the background. You can also use the PS command to verify that the MongoDB process is indeed running in the background. Use the less command to verify that the server logs are being written to the log file.

Next, let’s go back to the bin directory and execute the script to start the client. Make sure to give any necessary permissions to the script just like before. Now, you should be able to run commands like show DBS or help to get a list of helpful commands.

To exit the client type exit and to kill the server, use the PS command to get the process id then use the kill command. There you have it. Make sure you like, subscribe, and turn on the notification bell.

Until next time.

Connect MySQL In Python: https://www.youtube.com/watch?v=0qBctY82et0
Run Selenium PyTests In Parallel: https://www.youtube.com/watch?v=cQE6ABZ9I14
Find_elements() in Selenium: https://www.youtube.com/watch?v=uqWc_WyfTCI

Comments are closed.