데이터베이스/MongoDB2 MongoDB에 Replication을 설정해보자. 1. Replication 설정 [root@mongodb-01 ~]# mongosh --eval "printjson(rs.initiate())" Current Mongosh Log ID: 638448e842b9e0f3852f4230 Connecting to: mongodb://127.0.0.1:{port}/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.0 Using MongoDB: 6.0.3 Using Mongosh: 1.6.0 For mongosh info see: https://docs.mongodb.com/mongodb-shell/ ------ The server generated these startup warni.. 2022. 11. 28. MongoDB를 설치해 보자 MongoDB v6.0 CentOS 7.x로 진행됩니다. 1. yum repository 추가 [root@mongodb-01 ~]# vi /etc/yum.repos.d/mongodb-org-6.0.repo [mongodb-org-6.0] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/6.0/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc 2. yum repository 확인 yum list 명령어를 통해 mongodb 관련 패키지가 정상적으로 보이는지 확인할 수 있습니다. [root@.. 2022. 11. 28. 이전 1 다음