0

I would like to know if there is a way to run a local replica set, since Mac OS removed access to the root dir, I can't create new paths like /data/db/ I can't create directories so I can't set up mongod instances or even create keyfiles. It prevents me from being able to practice, any suggestion is welcome.

I hope I can solve this problem so that I can practice better

1 Answers1

0

for testing you can try using run-rs instead of a local homebrew mongod service.

see: https://www.npmjs.com/package/run-rs

or you can try setting up a single node replicat set for testing by editing your mongod.conf file for Intel I believe its located in /usr/local/etc/mongod.conf for M1 chip it is /opt/homebrew/etc/mongod.conf

see here: https://gist.github.com/davisford/bb37079900888c44d2bbcb2c52a5d6e8

also you can edit the data directory in the .conf file to where it is accessible instead of the root directory