Install MongoDB on Windows

Source: Internet
Author: User
Tags install mongodb

1. Download suitable mongodb

Official Website: http://www.mongodb.org/downloads

MongoDB for Windows has three versions:

  • MongoDB for Windows Server 2008 R2 only runs on Windows Server 2008 R2, Windows 7 64-bit, and updated Windows versions. This version makes full use of new Windows enhancements and cannot run on earlier Windows versions.
  • MongoDB for Windows 64-bit only runs in Windows XP and later 64-bit Windows versions, including Windows Server 2008 R2 and Windows 7 64-bit.
  • MongoDB for Windows 32-bit can run on any 32-bit Windows version above Windows XP. The 32-bit version of MongoDB is only applicable to old systems and system applications for testing and development.

I downloaded the latest version 2.2.0. During installation, the system reported the error "unable to locate the program Input Point InterlockedCompareExchange64 at mongodb startup. You can only view the documentation. version 2.2.0 does not support Windows XP (Changed in version 2.2: MongoDB does not support Windows XP. please use a more recent version of Windows to use more recent releases of MongoDB .), download the old version again.

 2. Unzip the installation package to the appropriate path.

Decompress the installation package to the path D: \ data \ mongodb.

3. Create a data folder

Create a data file D: \ data \ db

4. Start Mongodb

Run the following command:

D:\data\mongodb\bin\mongod.exe --dbpath D:\data\db

If the path contains spaces, double quotation marks are used to enclose the entire path. For example:

D:\data\mongodb\bin\mongod.exe --dbpath "D:\data\db test"

5.MongoDB sets the log directoryMongoDB as a Windows Service




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.