1. First to the official website (mongodb) Download the appropriate installation package, the latest version is 3.0.4
My computer is Win7 system 64-bit, download Windows 64-bit r2+ version, download completed after installation to the D:\MongoDB directory
2. After the installation is not available, you need to download KB2731284 This patch, do not know whether other systems need to install, after the installation is complete, restart the computer
The 3.mongodb installation directory is as follows D:\MongoDB\Server\3.0, creating the Data folder and creating the Db,log folder under the Data folder
4. Switch to the D:\MongoDB\Server\3.0\bin directory to execute the following command:
Mongod--dbpath D:\MongoDB\Server\3.0\data\db performed as follows:
If there is no problem you will see Port 27017 port number;
In the browser input http://localhost:27017 you can see the display information as
It looks like you is trying to access MongoDB over HTTP on the native driver port.
To this MongoDB installation is complete.
5.mongodb installed as a Windows service
Under the D:\MongoDB\Server\3.0\data folder, create a mongod.cfg file that reads as follows:
Logpath=d:\mongodb\server\3.0\data\log\mongod.log #日志路径
Dbpath=d:\mongodb\server\3.0\data\db #数据库路径
Logappend=true #错误日志采用追加模式, after configuring this option, the MongoDB log is appended to the existing log file instead of creating a new file
Journal=true #启用日志文件, enabled by default
Quiet=true #这个选项可以过滤掉一些无用的日志信息, set to False if you need to use Debug
port=27017 #端口号 defaults to 27017
Specific Reference http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/articles
6. Run the console program as Administrator, enter the following, if the installation path has spaces, the address needs to be added \ "such as binpath=" \ "D:\Mongo db\server\3.0\bin\mongod.exe\"
Sc.exe Create MongoDB2 binpath= "D:\MongoDB\Server\3.0\bin\mongod.exe--service--config=d:\mongodb\server\3.0\data\ Mongod.cfg "Displayname=" MongoDB2 "start=" Auto "
Such as:
7. Start the service
8. Test the database as
MongoDB 3.0.4 Installation