Skip to content

A replica set in MongoDB is a group of mongod processes that maintain the same data set. Replica sets provide redundancy and high availability and are the basis for all production deployments.

Notifications You must be signed in to change notification settings

nikbarseghyan/ReplicaSet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

High Availability

Որպես Օպերացիոն համակարգ օգտագործում ենք CentOS 8

Install MongoDB CentOS 8

$sudo nano /etc/yum.repos.d/mongodb-org.repo
$vim or nano /etc/yum.repos.d/mongodb-org.repo
    [mongodb-org-4.2]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc
$sudo dnf install mongodb-org
$sudo systemctl enable mongod --now
$mongo

Docker

$docker-compose up rs-Arbiter-1 adminmongo  or $docker-compose up -d rs-Arbiter-1 adminmongo
$docker ps
$vim or nano /etc/mongod.conf #Configure ( Կարգավորումներ)

$cd /var/lib/mongo/ & $mkdir master, slave, arbiter  #Create database folder ( Ստեզծել տվյալների բազայի ֆայլերի քարտացուցակ )

$chown mongod:mongod /var/lib/mongo/{ master,slave,arbiter } #Permissions ( Իրավունքներ )

About

A replica set in MongoDB is a group of mongod processes that maintain the same data set. Replica sets provide redundancy and high availability and are the basis for all production deployments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published