装MONGODB和PHP mongo driver

本文提供了一步一步的指南,说明如何在Ubuntu和Debian系统上安装和配置MongoDB数据库,包括添加GPG密钥、更新源、安装所需软件包等关键步骤。

 

参考: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-10genmongodb-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

装驱动:

Installing on *NIX

Run

sudo apt-get install make
$ sudo pecl install mongo

 Add the following line to your php.ini file:

 


extension=mongo.so
 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值