Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install multiple versions of MongoDB on linux

How can we setup multiple versions of MongoDB on Ubuntu 16.04?

MongoDB 3.4.1 is already up and running on my system and wanted to setup MongoDB 2.6 for other application. Because our Application running on MongoDB 2.6 is having DB driver which is not compatible with MongoDB 3.4 hence wanted run both MongoDB version on same linux server.

Tried to follow below link but couldn't succeed.

  1. How can I install two versions of mongodb parallely in Ubuntu 12.04 ?
  2. multiple versions of Mongo
  3. multiple instances of Mongo DB on same server
like image 591
user2423706 Avatar asked Apr 14 '17 12:04

user2423706


People also ask

What version of MongoDB do I need for Ubuntu?

MongoDB officially offers repo for Ubuntu, Debian, SUSE Linux, and Amazon. MongoDB officially recommends this method of installing MongoDB. This makes sure that you’re always using the latest version. Linux Mint is Ubuntu-based, so the Ubuntu repo will work just fine.

How to install two versions of MongoDB parallely in Ubuntu?

How can I install two versions of mongodb parallely in Ubuntu 12.04 ? 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:

How to run multiple versions of MongoDB on different ports?

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

What are the MongoDB database tools?

The MongoDB Database Tools are a suite of command-line utilities for working with MongoDB. Use this guide to install the Database Tools on the Linux platform. Starting with MongoDB 4.4, the MongoDB Database Tools are now released separately from the MongoDB Server and use their own versioning, with an initial version of 100.0.0.


1 Answers

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
like image 69
Ayman Nedjmeddine Avatar answered Sep 28 '22 07:09

Ayman Nedjmeddine