Install MongoDB and windowsmongodb in Windows 7

Source: Internet
Author: User
Tags install mongodb robomongo

Install MongoDB and windowsmongodb in Windows 7

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

2. For a 64-bit operating system, double-click the mongodb-win32-x86_64-2008plus-2.6.7-signed.msi, otherwise the mongodb-win32-i386-2.6.7-signed.msi

Click Next

Select accept protocol "I accept the terms in License Agreement" dbDao.com, and click Next

Select Typical Installation

Click Install

By default, mongodb is installed in C: \ Program Files \ MongoDB 2.6 Standard. Check that mongodb is installed and run it in cmd.

"C: \ Program Files \ MongoDB 2.6 Standard \ bin \ cmd.exe"-version

If MongoDB shell version: 2.6.7 is returned, the installation is successful. You can add the mongodb command to the environment variable PATH.

Click Start Menu, computer =, right-click menu =, and click Properties.

Menu advanced => Environment Variables

"C: \ Program Files \ MongoDB 2.6 Standard \ bin ";

Add the above information to the beginning of the variable value completely and click OK =.

If you want to renew your subscription, you can directly run the mongo command in cmd.exe to restart cmd.exe.

Start cmd.exe with the administrator ID.

Run 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 preceding command must be run as an administrator !!!

Then you can use the mongo command to log on to the database and execute some commands, such:

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

However, before executing the following command, You need to log on to mongodb, mongod -- dbpath E: \ mongodb \ data, and wait for a moment for the database to start.

Install the ROBOMONGO graphical management tool

Use the robomongo8.8.4-i386.exe graphical tool.

Double-click Run Robomongo-0.8.4-i386.exe

Run robomongo, find the Startup Program in the Start menu, and click Create

If you only connect to the local mongodb, you do not need to select anything. save

Click Local, and then click connect

You can use robomongo to manage mongodb.

Delete MongDB Service

If you no longer use the MongDB service, you can delete it. The command is as follows:

Net stop MongoDB

"C: \ Program Files \ MongoDB 2.6 Standard \ bin \ mongod.exe"-remove

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.