-1

my problem is like. my client has a server where their already system is working and that uses 2.4 MongoDB version. I check I can not upgrade MongoDB. now I create a system for them and that work in version 3 now how do I use two different version of MongoDB in on server?

first of all, I check multiple instances of Mongo DB on same server answer that is different that is for making multiple instances of one MongoDB but my main concern is two different version of one server or PC.

3
  • Just install mongodb into two different directories. The rest of the existing answer already applies. Commented Jun 15, 2017 at 5:38
  • thanks, @NeilLunn now I understand but that is a good thing that this big thing (MongoDB) working only on that directory where that program installed. Commented Jun 16, 2017 at 14:39
  • second, for start MongoDB, I call MongoDB and MongoDB start now with two version of MongoDB how to start specific version of MongoDB?. second, when I start both servers then how can both working in localhost:27017 maybe I have to change port manually. Commented Jun 16, 2017 at 14:42

1 Answer 1

1

One option is to run MongoDB in Docker containers. That way, you can have two separate installations of MongoDB, with different versions, and you can guarantee that they won't conflict with each other in any way.

There are images available for several of the more recent versions of MongoDB on dockerhub, or you can build your own docker image - for example if you need to use MongoDB Enterprise.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.