./categories/server
MongoDB 설치
MongoDB Replica Set 구성
rs.initiate({
_id: "rs0",
members: [
{ _id: 0, host: "localhost:27017" },
{ _id: 1, host: "localhost:27018" },
{ _id: 2, host: "localhost:27019" },
{ _id: 3, host: "localhost:27020" }
]
})
admin 계정 생성
db.createUser({
user: "root",
pwd: "비밀번호",
roles: ["root"]
})
./comments