mongodb的安装


mongodb 2019消息,不再开源,因此只能安装社区版本

brew tap mongodb/brew
brew install mongodb-community

To have launchd start mongodb/brew/mongodb-community now and restart at login:
brew services start mongodb/brew/mongodb-community
Or, if you don't want/need a background service you can just run:
mongod --config /usr/local/etc/mongod.conf

配置文件

/usr/local/etc/mongod.conf

启动服务端

brew services start mongodb/brew/mongodb-community
mongod --config /usr/local/etc/mongod.conf

启动客户端

mongo

常见命令:
show dbs;
use admin;
关闭服务
db.shutdownServer();

参考

https://github.com/mongodb/homebrew-brew
https://juejin.im/post/5d9d7ad66fb9a04e373163c3
https://www.runoob.com/mongodb/mongodb-osx-install.html


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM