⌘KCtrl+K 快速搜索

> 文章列表 / Page 51

2015-05-10

MongoDB获取命令行启动参数getCmdLineOpts

MongoDB获取命令行启动参数的方法; 有时候希望知道启动mongd的启动参数,可以使用如下命令获得: use admin db.runCommand("getCmdLineOpts") 例如 > use admin switched to db admin > db.runCommand("getCmdLineOpts") { "argv" : [ "/usr/local/opt/...
#POST 2 MIN READ
2015-05-09

如何在Ubuntu上安装MongoDB 3.0.2 WiredTiger

安装mongodb 3.0.2 操作系统是Ubuntu 14.04.1 LTS \n \l 主要步骤如下: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 sudo echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/...
#POST 6 MIN READ
2015-05-09

MongoDB示例数据导入Sample Data

基于github 项目https://github.com/tmcnab/northwind-mongo, 一个简单的MongoDB 示例数据加载方法,步骤很简单。 确保你的系统中已经已经安装mongodb server并在运行中 1、下载示例数据 northwind-mongo-master.zip https://www.askmaclean.com/wp-content/uploads/20...
#POST 5 MIN READ
2015-05-09

2015年的台北之行

出发: 开会 , APOUC , Thomas Kyte那时还在oracle 国父纪念馆 中正纪念堂 台北故宫门口,当时正式进去后是不让拍照的,所以只有门口的照片 台北101夜景: 101旁边在开复仇者漫展 正好去看了复仇者2的电影: 诚品书店的权游展: &n...
#POST 1 MIN READ
2015-05-09

常见问题解答:MongoDB原理

常见问题解答 MongoDB原理,翻译基于mongoDB 官方文档 http://docs.mongodb.org/manual/faq/fundamentals/ 本文档主要介绍mongodb使用的基础上层问题以及使用的概略。 如果在本文中没有找到你关心的问题解答,mongoDB官方建议你去mail list提问 ,或者阅读这份更完整的FAQ。 MongoDB是什么类型的数据库? ...
#POST 13 MIN READ
2015-05-07

MongoDB 配置Sharding Cluster 基于Ubuntu

本教程基于Ubuntu 14.04.2 LTS \n \l和mongoDB 3.0, 配置了3个 Config Servers(在产品环境中被要求),2个Query Router查询分发(最少1个必要),和3个shard Server(最少2个)。 注意确保在所有上述Server上已经安装了MongoDB 3.0以上版本,否则首先安装MongoDB,要在Ubuntu上安装MongoDB可以按照这个...
#POST 16 MIN READ
2015-05-07

MongoDB中的unique constraint/index

Mongodb中可以使用ensureIndex/createIndex+unique:true来创建unique index。 The unique constraint on indexes ensures that only one document can have a value for a field in acollection. For sharded collections the...
#POST 2 MIN READ
2015-05-06

MongoDB db.collection. ensureIndex 和 db.collection.createIndex

注意从mongoDB 3.0开始ensureIndex被废弃,今后都仅仅是db.collection.createIndex的一个别名。 db.collection.createIndex主要分成2部分: KEY和OPTION。 KEY: > db.dbdao_product.ensureIndex({x:1}); { "createdCollectionAutomatical...
#POST 8 MIN READ
2015-05-06

如何检查当前mongodb是否启用了WiredTiger存储引擎?

如何检查当前mongodb是否启用了WiredTiger存储引擎? 可以至少通过以下2种方法 验证: 1、在Linux/OSX上执行如下的命令 WIREDTIGER_CONFIGURED=`ps -ef|grep mongod|grep -i storageengine|grep -ic wiredtiger` echo ${WIREDTIGER_CONF...
#POST 5 MIN READ