ecstore中kvstore之mongodb

时间:2024-01-12 08:35:50

mongodb安装

详细见  http://blog.csdn.net/motian06/article/details/17560067

mongodb扩展安装

详细见  http://blog.csdn.net/motian06/article/details/17560029

mongodb开机自动启动

详细见  http://blog.csdn.net/motian06/article/details/17559647

ecstore中kvstore选用mongodb作为存储介质

修改ecstore/config/config.php文件

kvstore存储类选用base_kvstore_mongodb(app/base/lib/kvstore/mongodb.php)

# kvstroe存储类
define('KVSTORE_STORAGE', 'base_kvstore_mongodb')

#mongodb 服务器配置
#server:
#"mongodb://${username}:${password}@localhost" , "mongodb:///tmp/mongo-27017.sock"
define('MONGODB_SERVER_CONFIG', 'mongodb://localhost:27017');
#option:
#array("connect" => TRUE),array("username"=>'xxxx', "password"=>'xxx');
define('MONGODB_OPTION_CONFIG','return '. var_export(array('connect'=>true),1).';');

最后别忘了执行一下 app/base/cmd kvrecovery,不然会报错误的。kvstore数据恢复