日期:2014-05-16  浏览次数:20415 次

装MONGODB和PHP mongo driver

?

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

?

?

10gen publishes apt-gettable packages.? Our packages are generally fresher than those in Debian or Ubuntu.? We publish 2 distinct packages, named?mongodb-10gen,?mongodb-10gen-unstable?corresponding to our latest stable release, our latest development release. ? Each of these packages conflicts with the others, and with the?mongodb?package in Debian/Ubuntu.

The packaging is still a work-in-progress, so we invite Debian and Ubuntu users to try them out and let us know how the packaging might be improved.

Installing

To use the packages, add a line to your /etc/apt/sources.list, then 'aptitude update' and one of 'aptitude install mongodb-10gen', 'aptitude install mongodb-10gen-unstable' .? Make sure you add the?10gen GPG key, or apt will disable the repository (apt uses encryption keys to verify the repository is trusted and disables untrusted ones).? To add the GPG key, run this command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

Then, if you're on a Debianoid with SysV style init scripts (e.g., Debian Lenny or older Ubuntus), add this line verbatim to your /etc/apt/sources.list

deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen

If you're on a Debianoid with Upstart (e.g., recent Ubuntus), use this line in your sources.list:

deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

GPG Key

The public gpg key used for signing these packages follows. It should be possible to import the key into apt's public keyring with a command like this:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10


Install

In order to complete the installation of the packages, you need to update the sources and then install the desired package

 sudo apt-get update 
 sudo apt-get install mongodb-10gen