Graphic tutorial on installing MongoDB databases in Windows 7

Source: Internet
Author: User
Tags install mongodb mongodb windows mongo shell

The following is reproduced from the http://be-evil.org/install-mongodb-on-windows7.html

1. Download The MongoDB database for Windows
 
Go to the official download page to download the MongoDB Windows version. You can choose either 32-bit or 64-bit based on your own needs.
 
Http://www.mongodb.org/downloads
 
2. Installation preparation
 
Decompress the downloaded package to the desired location, and create a folder named dband A log.txt file under the directory.
 
The DB folder is used to store databases.
 
Log.txt is used to record MongoDB logs

3. Install MongoDB
 
The method described here is to install MongoDB as a Windows Service and open the windows command line (Note: Use the administrator privilege to start the command line) and move it to the bin folder under your MongoDB directory. The path I demonstrated here is D: \ Dev \ env \ MongoDB.
 
Run the following command to register MongoDB as a Windows Service:
 
Mongod.exe -- install -- logpath = D: \ Dev \ env \ MongoDB \ log.txt -- dbpath = D: \ Dev \ env \ MongoDB \ DB
 
-- The install parameter is used to set the installation as a server.
 
-- Logpath setting is the setting of the log file. log.txt is the file created in the previous step.
 
-- The dbpath parameter is used to set the path for storing database files. The DB folder has been created in the previous step.
 
The execution result is as follows:

Enter
 
Net start MongoDB
 
You can start the MongoDB service.
 
After startup, enter
 
Mongo
 
If you successfully enter the Mongo shell environment, it indicates that MongoDB has been installed successfully.

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.