Part1: Install and configure MongoDB: ReplicaSet, Primary/Slave mode, cheatcodes and scripts.

This guide describes the step-by-step installation, configuration and all further life with you production MongoDB cluster with a replica of 3 mongoDB nodes based on the WiredTiger engine.
Also you will find a deprecated installation and configuration in mode Primary/Slave. As well as some useful little things for people who first encountered MongoDB.

Everything that you need to know in production environment.

Important clarification:

  • Prior to installation, an understanding of the final architecture is required.
  • Some amenities require an Enterprise license.

( For reference you can give all fresh information on https://docs.mongodb.com/manual )

https://habr.com/ru/post/335772/

Engine WiredTiger is the new mongoDB engine, used by default instead of MMAP, starting with version 3.4. The good thing is that it works with data at the level of collections and individual documents, and not completely with the database. It also fixes the Global lock problem for the above reason, which is why it was chosen in production.

Install OS and components

We put Centos 7 of any version convenient for you. To simplify the scaling of nodes and databases, we recommend using lvm. Of the components, only ssh is needed for more convenient access to the server. Before deploying MongoDB in a production environment, consider the Production Notes document which offers performance considerations and configuration recommendations for production MongoDB deployments.

Install MongoDB.

Install MongoDB.

We use the free Community Edition, a guide will be based on it. If necessary, we will write the Enterpise version, as she was investigated.
This manual is described for the option of 3 servers (master, slave, arbiter).

So, let’s go:

  • Configure the package management system (yum). Create a /etc/yum.repos.d/mongodb-org-4.2.repo file so that you can install MongoDB directly using yum:
  • Installation from the official repository. Therefore, the key is important. First you need to import it.
  • Leave a Reply

    Scroll to top