Official website Installation Process

Docs.mongodb.com/v4.4/tutori…

Making the installation

Github.com/mongodb/hom…


Homebrew’s package manager installs MongoDB Community Edition

To execute the following command:

  1. brew tap mongodb/brew
  2. The brew install [email protected]

Installation creates the following files and directories in the location specified below, depending on your Apple hardware:

Intel processor Apple M1 Processor
The configuration file /usr/local/etc/mongod.conf /opt/homebrew/etc/mongod.conf
log directory /usr/local/var/log/mongodb /opt/homebrew/var/log/mongodb
data directory /usr/local/var/mongodb /opt/homebrew/var/mongodb

Add mongo environment variables: turn on ~/.zshrc add

The export PATH = "/ usr/local/opt/[email protected] / bin: $PATH." "

To add bash_profile, run source ~/.bash_profile

To run MongoDB (the Mongod process) as a macOS service, issue the following command:

The brew services start [email protected]Copy the code

After startup, run: Mongo Enter the Mongo operation interface

To stop Mongod running as a macOS service, use the following command as required:

Services stop [email protected] brewCopy the code

Robo3T connection

Mongo service should be started by terminal before connection

Address: 127.0.0.1; The default port number is 27017

New: