Step 1: Remove CSF if you installed it with the following instructions (http://drupal.org/node/1263372#comment-4921336)
You need to remove CSF because it prevents you from installing the needed GPG keys.
Next you need to install MongDB (http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages)
Step 2: If you’re on Debian Squeeze do:
$ nano /etc/apt/sources.list
and add
$ deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen
Step 3: Get your GPG key
$ apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
if you prefer not to uninstall CSF you could try
$ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
Step 4: Install MongoDB
$ apt-get update
next
$ apt-get install mongodb-10gen
You can check if MongoDB is properly running with the following command:
$ mongo
to quit mongo
$ exit
Then you need to install the PHP driver for MongoDB (http://www.php.net/manual/en/mongo.installation.php)
Step 4: Add extension=mongo.so to php.ini
$ nano /opt/etc/php.ini
and add
$ extension=mongo.so
do the same for
$ nano /usr/local/lib/php.ini
Step 5: Install mongo driver
$ apt-get install php5-dev build-essential php-pear
next
$ pecl install mongo
Step 6: Restart Nginx + Php-fpm
$ service nginx restart
and
$ service php-fpm restart
Step 7: Preparing local.setting.php
a) Create local.settings.php
b) Set the file permissions to “444”
Step 8: Completing local.settings.php
Add something similar to local.settings.php. Make sure you have the MongoDB modules downloaded into your Drupal installation before doing the following or any Drush commands will fail after you update your settings.php file with the following:
<?php
#MongoDB
$conf['mongodb_connections'] = array(
'default' => array( // Connection name/alias
'host' => 'localhost', // Omit USER:PASS@ if Mongo isn't configured to use authentication.
'db' => 'YOURDATABASENAME' // Database name. Make something up, mongodb will automatically create the database.
),
);
include_once('./includes/cache.inc');
# -- Configure Cache
$conf['cache_backends'][] = 'sites/SITENAME/modules/mongodb/mongodb_cache/mongodb_cache.inc';
$conf['cache_class_cache'] = 'DrupalMongoDBCache';
$conf['cache_class_cache_bootstrap'] = 'DrupalMongoDBCache';
$conf['cache_default_class'] = 'DrupalMongoDBCache';
# -- Don't touch SQL if in Cache
$conf['page_cache_without_database'] = TRUE;
$conf['page_cache_invoke_hooks'] = FALSE;
# Session Caching
$conf['session_inc'] = 'sites/SITENAME/modules/mongodb/mongodb_session/mongodb_session.inc';
$conf['cache_session'] = 'DrupalMongoDBCache';
# Field Storage
$conf['field_storage_default'] = 'mongodb_field_storage';
# Message Queue
$conf['queue_default_class'] = 'MongoDBQueue';
?>Step 9: Go to your site and enable the MongDB module.
http://drupal.org/project/mongodb
That’s It!
Comments
New Tutorial for Replica Sets
I am working on Tutorial specifically for replica sets. Started this in the MongoDB group cause I felt that was the proper place to put it.
http://groups.drupal.org/node/244493
Brady
@fastglassllc
@derailedonline
Error in Multisite
Error in Multisite, the fields (table_site1_node) and (table_site2_node) store data good but handler the same date db
site 1 settings.php = dbmongosite1
site 2 settings.php = dbmongosite2