美文网首页
mongdb单机开启副本集

mongdb单机开启副本集

作者: 酱油诗人077 | 来源:发表于2021-08-09 19:02 被阅读0次

非常感谢!参考:mongo 单机开启副本集事务

补充两点:

1.  4.2以后的版本开启副本集需要加入security.keyFile!

2.  在4.4版本测试可以动态的生成集合

1.  security.keyFile官方文档:

security.keyFile

The path to a key file that stores the shared secret that MongoDB instances use to authenticate to each other in a sharded cluster or replica set. keyFile implies security.authorization. See Internal/Membership Authentication for more information.

Starting in MongoDB 4.2, keyfiles for internal membership authentication use YAML format to allow for multiple keys in a keyfile. The YAML format accepts content of:

生成key文件:

openssl rand -base64 756 > <path-to-keyfile>

chmod 400 <path-to-keyfile>

配置文件:

security:

keyFile:<path-to-keyfile>

replication:

replSetName:<replicaSetName>

相关文章

  • mongdb单机开启副本集

    非常感谢!参考:mongo 单机开启副本集事务[https://www.jianshu.com/p/04d8cd6...

  • mongo 单机开启副本集事务

    mongo在进行事务操作的时候必须开启副本集。同时只有在master才能进行正常的写入操作。因此,我们不仅仅需要开...

  • 搭建MongoDB单节点副本集服务

    mongo普通单节点不支持事务,需要使用副本集或者mongos才行,原因如下 Docker部署MongoDB单机副...

  • mongodb分片副本集部署

    mongdb3.4 的副本集搭建与以前的版本有些区别,最主要的区别就是 configdb强制复制集(CSRS)。网...

  • Ajax数据库

    1.数据库mysql oracle sqlserver MongDB开启服务器:xampp phpstudy ...

  • 数据库

    1.数据库 mysql oracle sqlserver MongDB 开启服务器:xampp php...

  • 翻译:MongoDB副本集的同步性

    原文 为了维护共享数据集的最新副本,副本集的备份服务器可以从其他成员那里同步或者复制最新的数据。MongDB使用两...

  • PHP7之Mongodb的开发详解

    1.mongdb的连接 2.mongdb的添加 3.mongdb的删除 4.mongdb的修改 5.mongdb的...

  • AJAX

    数据库 (增删改查) mysql oracle sqlserver MongDB开启服务器 : Xampp ph...

  • mongodb单机升级为副本集

    服务器信息 ip系统配置目录172.24.32.201centos7.72c4g/var/lib/mongo (t...

网友评论

      本文标题:mongdb单机开启副本集

      本文链接:https://www.haomeiwen.com/subject/fkttbltx.html