Windows7 installing MongoDB (RPM)

Source: Internet
Author: User

1. Download Address: Http://www.mongodb.org/downloads (32-bit or 64-bit option). I downloaded: mongodb-win32-x86_64-2.4.5.zip

2, unzip the Mongodb-win32-x86_64-2.4.5.zip put to a certain location, decompression. I put it in the D:\dev directory. The path after decompression is D:\dev\mongodb-win32-x86_64-2.4.5

3. Install and prepare mongodb default data directory is: C:\data\db. If you do not use the default directory, you need to add the--dbpath parameter after the Mongod.exe command. Create a Data Catalog. I created the D:\dev\mongodb-win32-x86_64-2.4.5\data\db to create the log directory and its files. I created D:\dev\mongodb-win32-x86_64-2.4.5\log and D:\dev\mongodb-win32-x86_64-2.4.5\log\log.txt.

4. Start mongodb Open cmd window (cmd.exe), enter D:\dev\mongodb-win32-x86_64-2.4.5\bin, execute Mongod.exe command, see. Mongod.exe--logpath=d:\dev\mongodb-win32-x86_64-2.4.5\log\log.txt--dbpath=d:\dev\mongodb-win32-x86_64-2.4.5\ The data\db--logpath parameter is the path to the set log file. The--dbpath parameter is the set path for the database file. All parameter options for the Mongod.exe command can be viewed through Mongod.exe--help.

5. Install as a service use Administrator privileges to open the Windows CMD window and enter the D:\dev\mongodb-win32-x86_64-2.4.5\bin directory. Mongod.exe--install--logpath=d:\dev\mongodb-win32-x86_64-2.4.5\log\log.txt--dbpath=d:\dev\mongodb-win32-x86_ 64-2.4.5\data\db the--install parameter is set to set the server as a service, you can start or stop MongoDB in the same way as the cmd ( Windows cmd window with Administrator privileges open ) window. net start MongoDB start MongoDB service net stop MongoDB start MongoDB service

6, enter the shell environment interface into the sheelmongodb after the cmd window into the D:\dev\mongodb-win32-x86_64-2.4.5\bin directory, Enter Mongo.exe, you can enter the shell environment interface.

Windows7 installing MongoDB (RPM)

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.