Mongodb

我究竟如何安裝 MongoDB 2.4,而不是最新版本?

  • December 22, 2016

我已閱讀有關安裝舊版本的說明,但似乎 2.4 在 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

更新:我還向Mongo 的 JIRA 送出了一張票,該票已收到回复。

似乎從 v2.6 開始,Mongo 正在發布與 Ubuntu 匹配的軟體包:

  • mongodb-org - 將自動安裝下面列出的四個組件包的元包。
  • mongodb-org-server - mongod 守護程序和相關的配置和初始化腳本。
  • mongodb-org-mongos - mongos 守護程序。
  • mongodb-org-shell - mongo shell。
  • mongodb-org-tools - mongoimport、mongorestore 等。

但是直到 v2.4,Mongo 發布了一個mongodb-10gen 包,這顯然是你需要安裝的:

sudo apt-get install mongodb-10gen=2.4.10

引用自:https://serverfault.com/questions/613308