我安裝的MongoDB的official packages(mongodb的穩定),並遵循Quickstart guide,其中包括數據目錄問題:的MongoDB僅適用 -
如果我跑By default MongoDB will store data in
/data/db
, but it won't automatically create that directory. To create it, do:$ sudo mkdir -p /data/db/ $ sudo chown `id -u` /data/db
You can also tell MongoDB to use a different data directory, with the
--dbpath
option.
sudo mongod
MongoDB中才會開始 - 如果我嘗試和運行只是mongod
我得到的錯誤:
Mon Mar 14 15:27:07 [initandlisten] couldn't open /data/db/test.ns errno:13 Permission denied
Mon Mar 14 15:27:07 [initandlisten] couldn't open file /data/db/test.ns terminating
Mon Mar 14 15:27:07 dbexit:
是怎麼回事?
我希望所有的問題都被問及。 – 2011-05-01 01:05:33