博客:https://www.jianshu.com/p/7241f7c83f4a
官网:https://docs.mongodb.com/guides/server/install/
博客:
https://www.ucloud.cn/yun/98588.html(安装+设置开机启动)
https://www.jianshu.com/p/f8ca3d52e66d(报错)
官网:https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/
terminal1:
mongod
terminal2:
mongo
关闭:
terminal2:
# 关掉 terminal1
use admin
db.shutdownServer()
# 关掉terminal2
ctrl+c
open -e .bash_profile
加入:export PATH=/usr/local/Cellar/mongodb/4.2.8/bin:${PATH}
source ~/.bash_profile #使环境生效