MongoDB Series Tutorial (iii): Downloading and installing MONGODB_MONGODB in Windows

Source: Internet
Author: User
Tags mongodb

Software downloads

Download MongoDB Latest Package: Http://www.mongodb.org/downloads
Download MongoDB Visual interface, mongovue:http://download.csdn.net/detail/lovesummerforever/8036417

Software Installation

The MongoDB service-side installation steps are as follows:

1, adhere to the MONGODB specification, select your own disk creation folder, where I select the D disk, create the following directory structure

Copy Code code as follows:

D:\mongodb as the root directory of the installation
D:\mongodb\data Data Directory
D:\mongodb\data\db Database Directory
D:\mongodb\data\log Database log Directory

2, unzip the downloaded MongoDB of the latest compression package, copy the Bin folder into the MongoDB folder.

3, Mongo.exe is the shell client, and Mongod is the database itself, you can run under the DOS window.

4. Start process

Start the MongoDB service at a one-time.
Need to run under a DOS window, <c:\users\zhengqi-ff>mongod--dbpath=d:\mongodb\data\db

Integrating the MongoDB service into Windows

Like relational database MySQL, MySQL needs to start the MySQL service, and MongoDB needs to start the MongoDB database service. However, once the DOS boot MongoDB window is turned off, the service is stopped, and it is hard to start every time, and we can integrate the MongoDB service into the Windows service. Let the MongoDB service start up with the boot. The command looks like this:

To create a service:

Copy Code code as follows:

D:\mongodb\bin\mongod.exe--dbpathd:mongodb\data\db--logpath D:\mongodb\data\log\mongodb.log-- Install--servicename MongoDB

(PS: Remove the middle of the carriage return symbol, hereinafter)

Start the MongoDB service:

Copy Code code as follows:

NET START MongoDB

To delete a service:
Copy Code code as follows:

D:\mongodb\bin\mongod.exe--dbpath d:mongodb\data\db--logpath D:\mongodb\data\log\mongodb.log-- Remove--servicename MongoDB

Turn off the MongoDB service:
Netstop MongoDB

We will see the MongoDB services we add in Windows services:


The next article is mainly about MongoDB setting up user access rights

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.