Install and configure mongodb in the Mac system

The installation of the mongo

1. Official website download address:www.mongodb.com/try/downloa…Go in and select the Community edition

2. Decompress the downloaded file and rename it mongodb.

3. Press ⬆️+Command+G, enter /usr/local, and save the renamed file to the /usr/local directory

4. Configure environment variables, open the terminal, and enter open-e. bash_profile. In the open file, enter export PATH=${PATH}:/usr/local/mongodb/bin.

Then enter source. bash_profile for the configuration to take effect immediately.

5. Enter mongod –version. If the version number is displayed, the installation is successful.