MongoDB windowns Configuration Uses

Source: Internet
Author: User
Tags mkdir mongodb mongodb download mongodb server

MongoDB Download MongoDB offers pre-compiled binary packages for 32-bit and 64-bit systems that you can download from the MongoDB website,
MongoDB Pre-compiled binary package: https://www.mongodb.com/download-center#community
Create data Directory MongoDB stores the data directory in the DB directory. However, this data directory is not actively created, and we need to create it after the installation is complete. Note that the data directory should be placed under the root directory (e.g. C: \ or D:\. , etc.). In this tutorial, we've installed MongoDB on the C: disk, now let's create a directory of data and then create the DB directory in the data directory. C:\>CD c:\c:\>mkdir datac:\>cd datac:\data>mkdir dbc:\data>cd dbc:\data\db> command line running MongoDB server

In order to run the MongoDB server from the command prompt, you must execute the Mongod.exe file from the bin directory of the MongoDB directory.

Mongod--dbpath c:\data\db

If the execution succeeds, the following information is output:

2015-09-25t15:54:09.212+0800 i Control hotfix kb2731284 or later Update is  notinstalled, will Zero-out data files2015-09-25t15:54:09.229+0800 i JOURNAL [ Initandlisten] journal Dir=c:\data\db\journal2015-09-25t15:54:09.237+0800 i JOURNAL[initandlisten]  recover : no journal Files Present, no recovery needed2015-09-25t15:54:09.290+0800  i Journal [durability]durability thread started2015-09-25t15:54:09.294+0800 i CONTROL [ Initandlisten] mongodb starting : pid=2488 port=27017dbpath=c:\data\db 64-bit Host=win-1vonbjoce882015-09-25t15:54:09.296+0800 i control [initandlisten] targetminos:windows  7/windows server 2008 r22015-09-25t15:54:09.298+0800 i CONTROL [initandlisten]  db version v3.0.6 ...
  Run the MongoDB server as a Windows service

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.exe--bind_ip youripadress--logpath "C:\data\dbConf\mongodb.log"--logappend --dbpath "C:\data\db"--port yourportnumber--servicename "Yourservicename"--servicedisplayname "YourServiceName"-- Install

MongoDB windowns Configuration Uses

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.