Installing MongoDB under Windows 7

Source: Internet
Author: User
Tags mongodb commands robomongo

1. Download Mongodb-win32-x86_64-2008plus-2.6.7-signed.msi (now the latest version number is 3.0)

2. If you are a 64-bit operating system, double-click Mongodb-win32-x86_64-2008plus-2.6.7-signed.msi, otherwise Mongodb-win32-i386-2.6.7-signed.msi

Click Next

Select Accept agreement "I accept the terms in License agreement" dbdao.com. and click Next

Select Typical Typical installation

Click Install

MongoDB is installed by default under the C:\Program FILES\MONGODB 2.6 standard, confirming that MongoDB is installed and executing in cmd

"C:\Program Files\mongodb 2.6 Standard\bin\mongo.exe" –version

If you return to MongoDB Shell version:2.6.7, you have successfully installed the ability to add MONGODB commands to the environment variable path

Click the Start menu. Computer = "Right-click menu =" Tap Properties

Menu Advanced = environment variable

"C:\Program Files\mongodb 2.6 standard\bin";

Add the above information intact to the top of the variable value and click OK = To determine

Assuming that it joins correctly, the MONGO command can be executed directly in Cmd.exe, and once again open a Cmd.exe

Then open a Cmd.exe as an administrator

Run such as the following command

MD"C:\mongodb"MD"C:\mongodb\log"MD"C:\mongodb\data"Echo LogPath=C:\mongodb\log\mongo.Log> "C:\mongodb\mongod.cfg"Echo DBPath=C:\mongodb\data>> "C:\mongodb\mongod.cfg""C:\Program files\mongodb 2.6 Standard\bin\mongod.exe" --Config"C:\mongodb\mongod.cfg" --Install
Note that the above command must be performed as an administrator!

。!

You can then use the MONGO command to log in to the database and run some commands, such as:

mongoshow dbsshow collections  ;  db   dbdao   insert   url  :  " www.dbDao.com " });  db   dbdao   find   ()  

But before running the following command, you need to log in Mongodb,mongod--dbpath E:\mongodb\data Wait a moment for database to start

Installing the Robomongo graphical management tool

Use the Robomongo-0.8.4-i386.exe graphical tool that you downloaded earlier

Double-click Execute Robomongo-0.8.4-i386.exe

After executing the Robomongo, you can find the launcher in the Start menu, click Create

If you just connect to the local MongoDB, then you don't have to choose, save can

Point in the Local. and click Connect

You can then manage MongoDB through Robomongo.

Delete Mongdb Service

Assuming you no longer use the MONGDB service, you can delete the service. Commands such as the following:

net stop MongoDB

"C:\Program Files\mongodb 2.6 Standard\bin\mongod.exe" –remove

Installing MongoDB under Windows 7

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.