configure drupal 7 to use MongoDB

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';
?>

 

then Go to your site and enable the MongDB module.
http://drupal.org/project/mongodb

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s