一.安装docker. 请参考:http://www.cnblogs.com/hehexiaoxia/p/6150584.html 二.编写dockerfile. 1.在根目录下创建mongod的dockerfile. $ vi dockerfile #version 1.0 from ubuntu #maintainer maintainer hdx #install run apt-get clean run apt-get update run apt-get install -y vim
一.环境配置经验 1.一般安装的副本集的时候,主实例可以有数据库和用户:从实例不能.仲裁机不能有任何数据库包括用户 2.搭建副本集的时候Host使用外网IP,否则使用Mongodb VUE 1.6.9连接副本集异常 3. 如果需要登录从实例查看数据库信息,则需要执行db.getMongo().setSlaveOk(); 二.遇到的问题 1. Unable to connect to a member of the replica set matching the read preference