How to install two versions of mongodb in parallel in Ubuntu 12.04?
You can run multiple versions of mongoDB on the same host, as long as that version is not part of the same replica set as a general rule of thumb (which won't be a problem from your question).
Expand the 2 installation paths.
Run the application using:
mongod --port 12345
(where 12345 is the port you specified) To run exe on a different port.
The default port is 27017 if no port is specified in the command.
See http://docs.mongodb.org/manual/tutorial/manage-mongodb-processes/
Example:
Deploy:
C: \ mongo1 \ Bin \ mongod.exe
C: \ mongo1 \ data \
C: \ mongo2 \ Bin \ mongod.exe
C: \ mongo2 \ data \
Execute:
start / bc: \ mongo1 \ bin \ mongod --dbpath "c: \ mongo1 \ data" --port 27017
start / bc: \ mongo2 \ bin \ mongod --dbpath "c: \ mongo2 \ data" --port 27050
When connecting using MONGO.exe, be sure to specify the port to connect to the corresponding instance.
source to share