
If the storage directory / data / DB is not created first, an error will be reported if mongodb is started directly, and / data / DB cannot be found. #If the global path is not created, you need to enter the following directory Mongodb’s default database directory is / data / DB, so let’s create a new storage directory / data / DB first: $ sudo mkdir -p /data/db 3.2. Or, if you don't want/need a background service you can just run: To have launchd start mongodb now and restart at login:
BREW INSTALL MONGODB WITH SSL INSTALL
After the installation, you can see- $ brew install mongodbĪlready downloaded: /Users/liangma/Library/Caches/Homebrew/mongodb-3.4.4. This installation process will take a while. The result is-bash: search: command not found
BREW INSTALL MONGODB WITH SSL SOFTWARE
Use brew to view the installed software and search mongodb: $ brew list Bash? Profile file and save to exit! export PATH=/usr/local/mongodb/bin:$PATHĪfter installation, you can verify $ mongod -version Sudo mv mongodb-osx-ssl-x86_64-4.0.2 mongodbĪdd to path environment variable #It is recommended to add environment variables here

#For simplicity, rename it to mongodb directory #Download (see the link on the right side of the download button above) You can download the tar package directly to mongodb to decompress and install: mongodb download (MAC),īut command line installation is more recommended.

Note: WGet is not supported in MAC, so you have to download it in curl mode. Download and install the installation package in curl mode

