How exactly do I install MongoDB 2.4, instead of the latest version

mongodb

I've read the instructions on installing older versions but it appears that 2.4 is no longer available in the repos?

aptitude -y install mongodb-org-server=2.4
Unable to find a version "2.4" for the package "mongodb-org-server"
Unable to find a version "2.4" for the package "mongodb-org-server"
The following NEW packages will be installed:
  mongodb-org-server
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/9,416 kB of archives. After unpacking 23.7 MB will be used.
Selecting previously unselected package mongodb-org-server.
(Reading database ... 33931 files and directories currently installed.)
Preparing to unpack .../mongodb-org-server_2.6.3_amd64.deb ...
Unpacking mongodb-org-server (2.6.3) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up mongodb-org-server (2.6.3) ...
mongod start/running, process 30690

UPDATE: I've also filed a ticket with Mongo's JIRA, which has received a reply.

Best Answer

It appears that starting with v2.6, Mongo is releasing packages that match the Ubuntu ones:

  • mongodb-org - metapackage that will automatically install the four component packages listed below.
  • mongodb-org-server - the mongod daemon and associated configuration and init scripts.
  • mongodb-org-mongos - the mongos daemon.
  • mongodb-org-shell - the mongo shell.
  • mongodb-org-tools - mongoimport, mongorestore etc.

But up to v2.4, Mongo published a mongodb-10gen package, which apparently is what you need to install:

sudo apt-get install mongodb-10gen=2.4.10
Related Topic