MongoDB installation and its configuration

Source: Internet
Author: User
Tags mongodb server

Installation:

Short installation path D:MONGODB for subsequent operation

Configuration:

1. Create a new Data folder and create a new DB and log folder under the Data folder with the following path

Mongodb\data\db

Mongodb\data\log

2. Start the Mongod service

MongoDB connects Port 27017 by default, you can enter http://localhost:27017 in the browser to see if the port is occupied by MongoDB

3. Run the MongoDB server as a Windows service

Create a new Mongo.config file in the MongoDB folder

D:\MongoDB\mongo.config

and enter it in the file

Dbpath=d:\mongodb\data\db

Logpath=d:\mongodb\data\log\mongo.log

Run cmd as Administrator (C\windows\system32\cmd) Enter the following command line

Here because I have done it before, so the Logpath=d:\mongodb\data\log\mongo.log in Mongo.config Statement to create a mongo.log file before it becomes a mongo.log.2016-12-02t16-56-43 file

Continue to enter services.msc on the command line to locate the MongoDB service and then start, configure to this finish

4.MongoDB Background Management Shell

If you need to get into MongoDB background management, you need to open the bin directory of the MongoDB directory first, then execute the mongo.exe file, MongoDB Shell is the interactive JavaScript shell that comes with MongoDB, An interactive environment that is used to manipulate and manage MongoDB.
When you enter MongoDB background, it is linked to the test document (database) by default:

You may encounter a flashback when running this program, and the solution is to confirm that the MongoDB service is already open in the previous step. Or the execution of this file from the command line does not flash back.

For a simple operation with this shell, see: http://www.runoob.com/mongodb/mongodb-window-install.html

MongoDB installation and its configuration

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.