MacOS 安裝MongoDB

安裝

1. Update Homebrew’s package database.

brew update

2. Install MongoDB

brew install mongodb

3. Install the MongoDB Binaries with TLS/SSL Support

brew install mongodb --with-openssl

4. Install the Latest Development Release of MongoDB

brew install mongodb --devel


運(yùn)行

1. Create the data directory

mkdir -p /data/db

2. Set permissions for the data directory

Before running?mongod?for the first time, ensure that the user account running?mongod?has read and write permissions for the directory.

3. Run MongoDB

mongod

Specify the path of the data directory

If you do not use the default data directory (i.e.,/data/db), specify the path to the data directory using the--dbpath option

mongod --dbpath? <path to data directory>

參見(jiàn): https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Mac MongoDB安裝 一、安裝 MongoDB的安裝方法有很多,本文以官方文檔中的兩種方法為準(zhǔn)。 1. 手動(dòng)...
    Keriy閱讀 16,891評(píng)論 2 7
  • 安裝Homebrew Homebrew是Mac OSX下一個(gè)包依賴(lài)管理工具,用它來(lái)安裝軟件非常的方便只需要brew...
    liu_bo閱讀 542評(píng)論 0 2
  • NoSql數(shù)據(jù)庫(kù)優(yōu)缺點(diǎn) 在優(yōu)勢(shì)方面主要體現(xiàn)在下面幾點(diǎn): 簡(jiǎn)單的擴(kuò)展 快速的讀寫(xiě) 低廉的成本 靈活的數(shù)據(jù)模型 在不足...
    dreamer_lk閱讀 2,873評(píng)論 0 6
  • 不開(kāi)心
    潔潔姐姐吃吃吃閱讀 157評(píng)論 0 0
  • 佩奇排名(PageRank),又稱(chēng)網(wǎng)頁(yè)排名、谷歌左側(cè)排名,是一種由搜索引擎根據(jù)網(wǎng)頁(yè)之間相互的超鏈接計(jì)算的技術(shù),而作...
    Nicky_Ye閱讀 21,397評(píng)論 1 12

友情鏈接更多精彩內(nèi)容