0

好像他们给了我 1.4.4 这不是最新的。

这是正常的吗?我要1.6。但是我担心如果我做 apt-get uninstall 会发生不好的事情。

4

4 回答 4

3

I'd recommend using the official Ubuntu and Debian packages ...

http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages

That'll make sure you'll always get the latest stable version. If you use this on Ubuntu (for example) MongoDB will install to /var/lib/mongodb/ (instead of /data/db/)

So, if your data is already in /var/lib/mongodb/ you should be fine doing an uninstall and reinstall from the offical packages ... it shouldn't remove that dir unless it was a horible port in the first place!

Simply making a backup copy of that dir should do the trick if you are worried, good practice anyhow.

You can also always move your DB files into that dir after the install and MongoDB will pick them up (normally.)

Before you do anything however, just make sure you do a clean shutdown first! That way you won't end up with a mongod.lock file which won't let you do a restart w/o a repair.

$ ./mongo 
> use admin
> db.shutdownServer()
于 2011-01-25T09:00:13.817 回答
1

我建议不要碰您的发行版和操作系统版本,并选择安装下载包的简单解决方案:www.mongodb.org/downloads。特别是如果您使用的是 Debian,因为 Mongo 1.1.6 仅在不稳定 - packages.debian.org/search?keywords=mongodb 上受支持

提示:如果您使用的是 Debian 或 Ubuntu,请查看此页面:http ://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages

于 2011-01-25T08:56:29.947 回答
0

通过apt-getinstall 安装任何版本是所有已知存储库的默认版本。默认情况下,仅包含您的发行版存储库(Debian、Ubuntu、...)。

这些存储库包含定义明确、经过良好测试的软件版本。它们并不总是更新到最新版本(或者可能有点慢)。

如果您需要特定版本(或最新版本),那么您需要找到提供该版本(可能由软件开发人员提供)的存储库或通过其他方式安装它。

于 2011-01-25T08:33:28.093 回答
0

坦率地说,这是一个关于 Debian 打包系统的问题。无论如何,这是我的建议。

确保您在 apt-get 来源中列出了“不稳定”:

# cat /etc/apt/sources.list.d/unstable.list 
deb ftp://<your closest debian mirror>/debian/ unstable main contrib non-free
deb-src ftp://<your closest debian mirror>/debian/ unstable main

在镜像列表中找到您的镜像

然后做

apt-get update
apt-get install mongodb-server /unstable
apt-get install mongodb-clients /unstable

(如果是您的产品,请小心——MongoDB 将重新启动)

顺便说一句,Debian "unstable" 中 MongoDB 的最新版本是 1.6.5: MongoDB in "sid"

于 2011-01-25T09:20:46.620 回答