使用自制软件安装mongodb只安装了一个空文件夹

时间:2015-03-29 18:39:50

标签: mongodb

我在mac ios版本10.10.2上使用自制软件安装了mongodb。安装看起来好了,但是mongodb目录是空的。 / usr / local / var / mongodb

该目录是否不包含新安装的mongodb?

brew install mongodb

==> Downloading https://homebrew.bintray.com/bottles/mongodb-3.0.1.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/mongodb-3.0.1.yosemite.bottle.tar.gz
==> Pouring mongodb-3.0.1.yosemite.bottle.tar.gz
==> Caveats
To have launchd start mongodb at login:
    ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
Then to load mongodb now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
Or, if you don't want/need launchctl, you can just run:
    mongod --config /usr/local/etc/mongod.conf
==> Summary
  /usr/local/Cellar/mongodb/3.0.1: 17 files, 153M

2 个答案:

答案 0 :(得分:0)

二进制文件mongodmongo安装在/ usr / local / bin / mongodb

ls -lsa /usr/local/bin/mongodb/bin

数据库位置 - 因为您提及var - /data/db可以在mongod进程被踢的时候查看

$ /usr/local/bin/mongodb/bin/mongod

 MongoDB starting : pid=12379 port=27017 dbpath=/data/db 64-bit host=HostessTwinkies.local

答案 1 :(得分:0)

此文件夹应为空以启动。 Homebrew创建了mongodb配置(/usr/local/etc/mongod.conf),它将数据库路径设置为该目录。

dbpath = / usr / local / var / mongodb