I have a question with respect to Mongo DB Master / Slave setup on to the same machine .
I am using Ubutu 12 as OS .
Do i need to have two copies of MongoDB in the same machine ??
If yes , how can it allow to install two times seperately ??
(sudo apt-get install mongodb-10gen)
Since all the linked questions are for Windows and this is a Linux command I will divert from the “Possible duplicate” comment.
Yes you can run multiple
mongods on the same machine. Instead of installing multiple times you just startmongoddifferently like such:source: https://serverfault.com/questions/296246/multiple-mongos-on-one-server
But it is not recommended to do this due to resource contention, especially for memory. It will be horrid for even a development server and if you intend to put this setup into production then you might as well just go for one
mongod.If you want to run multiple instances on the same machine it is instead recommended to use containers such as virtual machines or something else. There are a few out there.