在独立mongod上启用oplog而不用于copysetset [英] oplog enable on standalone mongod not for replicaset

查看:66
本文介绍了在独立mongod上启用oplog而不用于copysetset的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将mongod作为独立服务器运行.现在我想为其启用oplog,我想知道是否有可能?

I am running mongod as standalone server .now i want to enable oplog for it ,i want to know whether it is possible or not ?

我知道我可以通过创建单节点ReplicaSet来做到这一点,但是我想在没有副本集的情况下做到这一点.

I knew I can do this by creating single node ReplicaSet ,but I want to do this without replica set .

推荐答案

我收到了MongoDb团队的回复,并且工作正常.

I got a reply from the MongoDb Team, and it's working fine.

要在独立服务器上启用oplog,请使用master选项启动mongo.

To enable oplog on a standalone server, start mongo with master options.

在命令行上启动mongod --master.

对于conf文件,请添加以下行:

For conf file append the following line:

master=true

更多详细信息此处.

这篇关于在独立mongod上启用oplog而不用于copysetset的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆