Introduction to MongoDB
1.0 - draft
1.0 - draft
  • MongoDB
  • Getting Started
    • General
      • Database? Collection? Schema?
      • RDBMS? NoSQL?
      • Scale-Up ? Scale - out?
      • JavaScript Object Notation
    • MongoDB
      • 간략한 역사,
    • Manipulating Database
      • MongoShell
      • PyMongo
  • CRUD
    • General
      • Explain()
      • mongoimport
    • Create
      • Mongo Shell
      • PyMongo
      • Exercises
    • Read
      • Mongo Shell
      • PyMongo
      • Exercises
    • Update
      • Mongo Shell
      • PyMongo
      • Exercises
    • Delete
      • PyMongo
      • Exercises
    • Challenging Exercises
      • Exercise 1
  • Index with Geospatial & Text
    • Basic Index
      • Syntax
      • Exercises
    • Geospatial Index
      • Syntax
      • Exercises
    • Text Index
      • Syntax
      • Exercises
    • Challenge
  • Aggregate framework
    • Aggregate Framework
      • Basic
      • Exercises
  • Distributed
    • Replication
      • Setup
        • Configuration File
        • Running Servers
        • Initiation
        • Exercises
      • Concerns
        • Read Concern
        • Write Concern
        • Exercises
    • Sharding
      • Getting Started
      • Setup
  • MongoDB 4.0 Features
    • Multi-Document Transaction
      • Transaction?
      • Basic
      • Exercises
  • Administration
    • Untitled
Powered by GitBook
On this page

Was this helpful?

  1. Distributed
  2. Replication
  3. Setup

Running Servers

기존에 Single node 기반의 MongoDB를 이용할 때 사용하던 Mongo Deamon인 mongod를 이용하여 mongo를 작동시킨다.

만약, 여러대의 컴퓨터에 나눠서 동작시키는 독자가 있다면, 아래의 명령어들은 각각 다른 컴퓨터에서 실행되어야 할 것이다.

mongod의 --config option은 configuration file의 path이다. 이전 절에서 작성한 configuration file 의 path를 기입해주면 된다.

$ mongod --config /path/to/mongodb/replica-set/primary/mongod.conf
$ mongod --config /path/to/mongodb/replica-set/secondary-1/mongod.conf
$ mongod --config /path/to/mongodb/replica-set/secondary-2/mongod.conf
PreviousConfiguration FileNextInitiation

Last updated 5 years ago

Was this helpful?