MongoDB installs Windows a bit

Source: Internet
Author: User
Tags mongodb server

MongoDB installs Windows a bit 

https://www.mongodb.org/downloads?_ga=1.207888916.746558625.1410501054

Download, note version 64,32

Direct MSI installation, select the installation path, D:\MongoDB

Then there will be a file when the installation is complete

Bin,gnu-agpl-3.0,readme,third-party-notices

Then create a new data in this directory, which is responsible for placing the MongoDB data, and then adding the bin to the system environment variable

Mongod--dbpath D:\MongoDB\data, add data

This time MongoDB is running with the current CMD, turn off the cmd Shell,mongo to stop running, do you want a background run?

Fork This command seems to be only available under Linux

C:\users\administrator>mongod--logpath "D:\MongoDB\data\mongodb.log"--logappend--dbpath "D:\MongoDB\data"-- ServiceName "Netmongo"--install

In the Task Manager service interface, you can see the

Enter URL http://localhost:27017/try it.

Specific parameter description

Note that you must have administrative privileges to run the following command. Execute the following command to run the MongoDB server as a Windows service:

Mongod--bind_ip youripadress--logpath "C:\data\dbConf\mongodb.log"--logappend--dbpath "C:\data\db"--port Yourportnumber--servicename "Yourservicename"--servicedisplayname "Yourservicename"--install

The following table describes the parameters for MongoDB startup:

Parameters Description
--bind_ip Bind service IP, if bind 127.0.0.1, can only native access, do not specify default local all IP
--logpath Specify the MongoDB log file, note that the specified file is not a directory
--logappend Write a log using an Append method
--dbpath Specify the database path
--port Specifying the service port number, default port 27017
--servicename Specify the service name
--servicedisplaynam Specifies the service name that is executed when there are multiple MongoDB services.
--install Specifies the installation as a Windows service.

You can also see the relevant content in the Mongodb.log under data

FLASK under the operation of MongoDB can refer to this article, this is the use of Pymongo

Http://www.pythondoc.com/flask-pymongo/index.html

MongoDB installs Windows a bit

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.