Installing MongoDB in the Windows 7 environment

Source: Internet
Author: User
Tags mongodb commands robomongo

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

2. If the 64-bit operating system is 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

By default MongoDB will be installed under C:\Program FILES\MONGODB 2.6 Standard, confirm that MongoDB is installed, run in cmd

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

If you return to MongoDB Shell version:2.6.7, the installation is successful and you can add MONGODB commands to the environment variable path

Click on the Start menu, computer = "context menu =" click Properties

Menu Advanced = environment variable

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

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

If you add it correctly, you can run the MONGO command directly in Cmd.exe and reopen a Cmd.exe

Then open a Cmd.exe as an administrator

Execute 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 the above command must be run as Administrator!!!

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

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

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

Installing the Robomongo graphical management tool

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

Double-click Run Robomongo-0.8.4-i386.exe

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

If you only connect to local MongoDB, then nothing is chosen, save can

Click Local, and tap Connect

You can then manage MongoDB through Robomongo.

Delete Mongdb Service

If you no longer use the MONGDB service, you can delete the service with the following command:

net stop MongoDB

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

Installing MongoDB in the Windows 7 environment

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.