The official download site for MongoDB is http://www.mongodb.org/downloads. you can download the latest Program . On the download page, you can see that OS X, Linux, windows, and Solaris are fully supported, and each version has its own 32-bit and 64-bit versions. The current stable version is 1.8.1.
1. Windows Installation
(1) download MongoDB
URL: http://downloads.mongodb.org/win32/mongodb-win32-i386-1.8.1.zip
(2) set the MongoDB directory
Decompress the package to the mongdb folder on disk D. The path is D: \ mongdb.
3) set the data file path
Create a logs and data folder in D: \ MongoDB
Create a MongoDB. Log File in D: \ MongoDB \ logs.
2. ConfigurationMongoServer:
Open the CMD window: Enter the following command:
> D:
> Cd D: \ MongoDB \ bin
> Mongod -- dbpath D: \ MongoDB \ data -- logpath = D: \ MongoDB \ logs \ MongoDB. log -- install
Enable MongoDB in the service
For Windows 7. Run cmd as the administrator.
3. Client Connection Verification
Open a new cmd input: D: \ MongoDB \ bin \ Mongo. If the following prompt appears, you can start your MongoDB Journey:
D: \ MongoDB \ bin> D: \ MongoDB \ bin \ Mongo
MongoDB shell version: 1.8.1
Connecting to: Test
>
4. View logs
D: \ MongoDB \ logs MongoDB. Log
5. Supplement
C: \ MongoDB \ bin > Mongod -- Help
Windows Service Control Manager options:
-- Install install MongoDB Service
-- Remove remove MongoDB Service
-- Reinstall reinstall MongoDB Service (equivilant of mongod
-- Remove followed by mongod -- install)
-- Servicename Arg Windows Service name
-- Servicedisplayname Arg Windows Service display name
-- Servicedescription Arg Windows Service Description
-- Serviceuser Arg user name service executes
-- Servicepassword Arg password used to authenticate serviceuser