Linux下MongoDB安装和启动配置(二)

2014-11-24 18:12:15 · 作者: · 浏览: 1
ync 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服务器



6. 进入数据库的CLI管理界面

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

运行如下:

[root@namenode mongodb]# ./bin/mongo

MongoDB shell version: 1.8.2

connecting to: test

> use test;

switched to db test



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

mongod --repair