Creation of a copy of MongoDB under Windows

Source: Internet
Author: User
Tags mongodb

Steps:

One. Installing MongoDB

Two. 2 copies of MongoDB to be installed

Three. Modifying a configuration file

dbpath=c:\mongofuben\zhu\datalogpath=c:\mongofuben\zhu\logs\mongodb.loglogappend=truejournal=truequiet= trueport=27017

dbpath=c:\mongofuben\fu1\datalogpath=c:\mongofuben\fu1\logs\mongodb.loglogappend=truejournal=truequiet= trueport=27018

  

  

dbpath=c:\mongofuben\fu2\datalogpath=c:\mongofuben\fu2\logs\mongodb.loglogappend=truejournal=truequiet= trueport=27019

  

  

Four. Start

1, start the master node first

Mongod--dbpath=c:\mongofuben\zhu\data--master

2. Start the slave node

(1) Mongod--dbpath=c:\mongofuben\fu1\data--port=27018--slave--source=127.0.0.1:27017

(2) Mongod--dbpath=c:\mongofuben\fu2\data--port=27019--slave--source=127.0.0.1:27017

Creation of a copy of MongoDB under Windows

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.