Install multiple versions of MongoDB on linux
To do that, you must have both versions of MongoDB available on your system.
For instance, let's say you have downloaded the 2.6 version binaries to /opt/mongo/26/
and the other version's at /opt/mongo/34/
, you could run both versions of the database daemon on different ports:
/opt/mongo/26/mongod --dbpath /data/26/ --port 27017
/opt/mongo/34/mongod --dbpath /data/34/ --port 28018