I am a newbie in MongoDB. Also I have not much knowledge in networking and servers. I am trying to deploy sharded cluster in mongodb using this article.
It says I need to deploy three configuration server instances and create data directories for each.
I can create a data directory using this command
mkdir /data/configdb
But how do I do this for all three of them?
Also I want to do this in only one machine.
As dev mentioned, for testing purposes a single config server is pretty much enough, and three config servers should be considered for production deployment.
But anyway, there is no problem creating separate directories for each config server on one machine. As you have mentioned, yes you can create directories, but data directory for any mongo instance (
mongod
,configsvr
, etc.) is not limited to any path. So that means you can create separate directories and launchmongod
config servers by specifying path for each: