个人博客相关 发表于 2023-02-19 更新于 2025-05-19 分类于 技术 本地安装12brew tap mongodb/brewbrew install mongodb-community Op1-作为mac服务12345678#启动brew services start mongodb/brew/mongodb-community@7.0# 查看 [hello-world.md](hello-world.md)brew services list# 停止brew services stop mongodb/brew/mongodb-community@7.0# 重启brew services restart mongodb/brew/mongodb-community@7.0 Op2-手动启动1mongod --config /usr/local/etc/mongod.conf 8.0.9 default configuration12345678#log file # Op1方式:/usr/local/var/log/mongodb/output.log# Op2方式:/usr/local/var/log/mongodb/mongo.log# config /usr/local/etc/mongod.conf 连接1mongosh "mongodb://localhost:27017"