安装MongoDB
/usr/local
vim ~/.bash_profile
PATH="/usr/local/mongodb/bin:${PATH}"
export PATH
source vim ~/.bash_profile
mongod -version
db version v4.2.3
git version: 6874650b362138df74be53d366bbefc321ea32d4
allocator: system
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
/usr/local/mongodb/bin
sudo ./mongod --dbpath=/Users/Macbook/Documents/SysSoftware/mongodb/db/
cd /usr/local/mongodb/bin
./mongo
> show dbs
admin 0.000GB
config 0.000GB
local 0.000GB
use admin
db.shutdownServer()
MongoDB Compass Community
下载:
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/1d73cb4fabdad40169f853d58418caf6.png)