Catalina Brew Install

14th Feb 2020

STEP 4: Install Puppet Agent. The Puppet Agent can be installed on macOS Homebrew or via terminal. Option 1: Installing with Homebrew. If you don’t already have Homebrew, install it using. Homebrew is an open-source package manager for macOS that offers an easy way to install software and tolls through the command line. If you are a coder, developer, Terminal lover, or more tech-savvy than an average Mac user, you can use Homebrew to simplify software installation on your Mac. Homebrew installs the apps you need that Apple didn’t include in their base operating system or app store such as cutting edge version of gnu/bash. See how to install Homebrew on macOS to use the brew package manager. Homebrew user can type the following brew command to install the latest version of bash on Catalina: brew install bash. Homebrew (brew) is a free and open-source package manager that allows installing apps and software in macOS, depending on the user’s desire. It has been recommended for its simplicity and effectiveness in saving time and effort. Its famous description is “The missing package manager for macOS”. Step 4 — Installing, Upgrading, and Removing Packages. Now that Homebrew is installed, use it to download a package. The tree command lets you see a graphical directory tree and is available via Homebrew. Install tree with the brew install command: brew install tree.

I had to reconfigure my Macbook after sending it for repairs. During the reconfiguration period, I noticed the instructions I linked to in “Setting up a local MongoDB connection” were outdated.

Install

Here’s an updated version on how to install MongoDB on a Mac.

There are a few steps:

First, you install Homebrew. If you’re curious about what Homebrew is, read this article.

Second, find the MongoDB tap.

Third, install MongoDB.

Catalina

MongoDB is now installed on your computer.

Preparations (Before MacOS Catalina)

Before you can use MongoDB, you need to create a /data/db folder on your computer to use MongoDB. You can create this folder with the following command:

You also need to give permissions to use it:

Now you can follow the rest of the article to set up your MongoDB connection.

Preparations (MacOS Catalina onwards)

Apple created a new Volume in Catalina for security purposes. If you’re on Catalina, you need to create the /data/db folder in System/Volumes/Data.

Use this command:

Then, use this command to give permissions:

Using MongoDB

In the past, I can run the mongod command to start MongoDB. This no longer works out for the box from MongoDB v4.2.3 onwards.

The best way to start MongoDB now is via brew services.

Starting MongoDB

Catalina brew install

Use this command:

MongoDB will start as a background service. Here’s what you’ll see:

You can use start instead of run. start will start MongoDB automatically when you login into your Macbook. I prefer run since I don’t want MongoDB to be running all the time.

Checking if MongoDB is running

Catalina Brew Installer

Use this command:

Homebrew will list all running services. If MongoDB is running, mongodb-community will have a status set to started.

The Mongo Shell

Macos Catalina Brew Install Java

Catalina brew installerMacos catalina brew install java

Catalina Brew Install

If MongoDB is running, you should be able to access the Mongo shell with the mongo command.

Stopping MongoDB

Catalina Brew Installation

Use this command:

Homebrew will stop MongoDB and let you know.

Aliases to make these easier

It’s a chore typing brew services run mongodb-community every time I want to start MongoDB.

I created some aliases to make things easier for me. Here are my aliases:

What’s next?

If you haven’t already, you should learn how to set up a local MongoDB connection.

If you enjoyed this article, please tell a friend about it! Share it on Twitter. If you spot a typo, I’d appreciate if you can correct it on GitHub. Thank you!