MongoDB 数据库简单介绍(安装篇)(二)

2014-11-24 18:21:33 · 作者: · 浏览: 1
ify a single database to replicate 当为从时,指定需要从主复制的单一库


--pairwith arg address of server to pair with


--arbiter arg address of arbiter server 仲裁服务器,在主主中和pair中用到


--autoresync automatically resync if slave data is stale 自动同步从的数据


--oplogSize arg size limit (in MB) for op log 指定操作日志的大小


--opIdMem arg size limit (in bytes) for in memory storage of op ids指定存储操作日志的内存大小


Sharding options:


--configsvr declare this is a config db of a cluster 指定shard中的配置服务器


--shardsvr declare this is a shard db of a cluster 指定shard服务器


进入数据库的CLI管理界面


cd到mongodb目录下的bin文件夹,执行命令./mongo


运行如下:


数据库出现如不能连上,则是一个data目录下的mongod.lock文件的问题,可以用如下的修复的命令,


mongod --repair