更多內(nèi)容歡迎來到博客 :https://imjianjian.github.io
<b>
MongoDB版本:3.4
</b>
一、下載MongoDB
官網(wǎng)下載地址:https://www.mongodb.com/download-center#enterprise
二、配置MongoDB
有安裝版和解壓版提供選擇,安裝后目錄結(jié)構(gòu)相同,如下:
- /mongodb
- /bin
- GNU-AGPL-3.0
- MPL-2
- README
- THIRD-PARTY-NOTICES
<b>
將bin目錄配置到系統(tǒng)變量path中
</b>
<b>
編寫mongoDB的配置文件(mongodb.config)
</b>
文件內(nèi)容:
配置信息內(nèi)容:
//存放數(shù)據(jù)庫文件的地址
dbpath=D:\devSoft\mongodb\db
//存放日志文件的地址
logpath=D:\devSoft\mongodb\log\mongodb.log
<b>
將mongodb服務(wù)添加到系統(tǒng)中
</b>
以管理員啟動cmd,輸入:
mongod --config D:\devSoft\mongodb\mongodb.config --install --serviceName "mongodb"
這里將mongodb服務(wù)命名為‘mongodb’
<b>
使用命令啟動和關(guān)閉mongodb服務(wù)
</b>
net start mongodb //啟動服務(wù)器
net stop mongodb //關(guān)閉服務(wù)器
三、MongoDB可視化工具推薦
- MongoDB Cloud Manager
- MongoClient
- adminMongo
- NoSQL Manager for MongoDB
- Robo 3T