Posts

Showing posts from February, 2022

Setting MongoDB Replication dengan Replica Set dan Arbiters di centos

Image
 Hi semua, mohon maaf, sudah lama gak nulis jadinya agak kaku nulisnya hehheheheh. langsung saja kita buat replika set mongodb dengan arbiter dan menggunakan password/authentication  kita samain dulu servernya ya  1. Install MongoDB buat file repo ,  vim /etc/yum.repos.d/mongo.repo  , masukan ketikan dibawah ini [MongoDB] name=MongoDB Repository baseurl=http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/$basearch/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc ketik,  yum install mongodb-org aktifkan mongodb, s ystemctl start mongod && systemctl enable mongod 2. Modify /etc/hosts file On mongodb1 (and mongodb2) server, modify the /etc/hosts file and add the following. 192.168.100.1 mongodb1 192.168.100.2 mongodb2 192.168.100.3 arbiter1 3. Enable Auth on all MongoDB Nodes and activate replica edit file config mongodb # vi /etc/mongod.conf security: auth = true bindIp: 0.0.0.0 (edi...