Jack Wallen walks you thru the straightforward steps of getting the NoSQL database, MongoDB, put in on macOS.
For many who have tried, putting in MongoDB on the newest Ubuntu launch model 22.04 is nothing in need of a headache. The rationale for this downside is that Ubuntu now not helps libssl1.1, which continues to be a requirement for MongoDB. I’ve tried to get this highly effective, NoSQL database put in and operating on Jammy Jellyfish however have had zero luck. I can get it to put in, however it at all times fails upon begin.
I’ve additionally discovered putting in MongoDB on AlmaLinux to be problematic. To that finish, I’ve turned to a different working system for my MongoDB wants: macOS. With macOS, getting MongoDB up and operating is pretty easy, as long as your means round Homebrew.
Let me present you ways.
SEE: Hiring Package: Database engineer (TechRepublic Premium)
What you’ll want
The one factor you’ll must make this work is a macOS machine. I’ll be demonstrating on a MacBook Professional. Let’s get busy.
The way to set up Homebrew
The very first thing you’ll must do is set up Homebrew, which is a command-line bundle supervisor for macOS and essential for energy customers. To put in Homebrew, log in to your macOS machine, and open the terminal software from the Launchpad. With the terminal open, difficulty the next command:
/bin/bash -c “$(curl -fsSL https://uncooked.githubusercontent.com/Homebrew/set up/HEAD/set up.sh)”
That set up will take a while to efficiently full.
The way to set up MongoDB
With Homebrew put in, we are able to now set up MongoDB. We’re going to put in the newest model of the database server (v6). Earlier than we run the set up command, we should first faucet MongoDB with Homebrew, utilizing the command:
brew faucet mongodb/brew
When this completes, we are able to then set up MongoDB utilizing the command:
brew set up mongodb-community@6.0
Once more, this command will take a while to finish. As soon as it does, MongoDB is put in and able to be began.
The way to begin MongoDB
To begin and allow the MongoDB server, difficulty the command:
brew companies begin mongodb/brew/mongodb-community
To make sure the service is operating, difficulty the command:
brew companies listing
You must see that the service has efficiently began (Determine A).
Determine A
How to hook up with the MongoDB shell
To entry the MongoDB shell, difficulty the command:
mongosh
Congratulations, you now have MongoDB 6.0 Group Version operating on macOS. Now you can begin constructing your databases for no matter challenge you take into consideration.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the newest tech recommendation for enterprise professionals from Jack Wallen.