1.下載mongodb-win32-x86_64-enterprise-windows-64-3.4.9.zip並解壓,
而後建立數據文件和日誌文件保存路徑
d:\mongodb-win32-x86_64-enterprise-windows-64-3.4.9\data\db
d:\mongodb-win32-x86_64-enterprise-windows-64-3.4.9\logmongodb
2.建立配置文件mongod.cfgwindows
systemLog: destination: file path: d:\mongodb-win32-x86_64-enterprise-windows-64-3.4.9\log\mongod.log storage: dbPath: d:\mongodb-win32-x86_64-enterprise-windows-64-3.4.9\data\db
3.以管理員身份運行cmd 安裝mongodb服務
"D:\mongodb-win32-x86_64-enterprise-windows-64-3.4.9\bin\mongod.exe" --config "D:\mongodb-win32-x86_64-enterprise-windows-64-3.4.9\mongod.cfg" --install
微信
4.啓停mongodb服務日誌
net start MongoDB net stop MongoDB
5.卸載mongodb服務
"D:\mongodb-win32-x86_64-enterprise-windows-64-3.4.9\bin\mongod.exe" --remove
code
6.鏈接mongodb並進行驗證
先打開mongodb安裝目錄下的bin目錄,而後執行mongo.exe
show dbs
ip
技術分享離不開您的支持,您的支持是我源源不斷的動力。支付寶