1. Download: http://www.mongodb.org/downloads
2. Unzip it and put it in the directory where you want to install the MongoDB, we assume the/mongodb directory (win can also be installed with MSI file)
3. Create the following directories and files (/mongodb is the root directory for MongoDB installation)
Catalog:/mongodb/data/db
Files:/mongodb/logs/mongo.log
Files:/mongodb/mongo.config
4. Configure the Mongo.config file (the following is the content of the configuration file under Win, MAC, Linux make the corresponding changes)
# #数据文件dbpath=e:\mongodb\data\db# #日志文件logpath=e:\mongodb\logs\mongo.log# #错误日志采用追加模式, After configuring this option, the MongoDB log is appended to the existing log file instead of creating a new file Logappend=true #启用日志文件, Journal = True is enabled by default #这个选项可以过滤掉一些无用的日志信息, if you need to debug use set to Falsequiet=true#端口号 defaults to 27017port=27017
5. Test the installation
/mongodb/--config. //mongodb/bin# start MongoDB shell$ MONGO
6. Win Set as service
--config D:\MongoDB\etc\mongodb.conf--install#SC mode SC create MongoDB binpath"e:\ Mongodb\bin\mongod.exe--service--config=e:\mongodb\mongo.config"net start MongoDB
7. Mac, Linux settings
Create file:/mongodb/runmongo.sh
File content: sudo./bin/mongo--config./MONGO.CONFGI
8. Installing the IDE
Recommended for open Source: Robomongo
: https://robomongo.org
MongoDB installation Configuration