[root@hadoop1 ~]# ps -aux | grep mongodb;
root 0.4 0.2 ? Sl : : /usr/local/mongodb/bin/mongod -f /usr/local/mongodb/conf/mongod.conf
root 0.0 0.1 pts/ Sl+ : : /usr/local/mongodb/bin/mongo --host hadoop1
root 0.0 0.0 pts/ S+ : : grep --color=auto mongodb
[root@hadoop1 ~]# kill ;
[root@hadoop1 ~]# kill ;
[root@hadoop1 ~]# /usr/local/mongodb/bin/mongod -f /usr/local/mongodb/conf/mongod.conf
about to fork child process, waiting until server is ready for connections.
forked process: 17129
child process started successfully, parent exiting
[root@hadoop1 ~]# /usr/local/mongodb/bin/mongo
MongoDB shell version v3.4.0
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.0
> cfg={_id:'replSet1',members:[{_id:1,host:'hadoop1:27017'},{_id:2,host:'hadoop2:27017'},{_id:3,host:'hadoop1:27017'}]}
{
"_id" : "replSet1",
"members" : [
{
"_id" : 1,
"host" : "hadoop1:27017"
},
{
"_id" : 2,
"host" : "hadoop2:27017"
},
{
"_id" : 3,
"host" : "hadoop1:27017"
}
]
}
> rs.initiate(cfg);
{
"ok" : 0,
"errmsg" : "Attempting to initiate a replica set with name replSet1, but command line reports repl_test; rejecting",
"code" : 93,
"codeName" : "InvalidReplicaSetConfig"
}

https://docs.mongodb.com/manual/reference/glossary/#term-master  

mongoThe MongoDB shell. The mongo process starts the MongoDB shell as a daemon connected to either amongod or mongos instance. The shell has a JavaScript interface. See mongo and mongo Shell Methods.mongodThe MongoDB database server. The mongod process starts the MongoDB server as a daemon. The MongoDB server manages data requests and formats and manages background operations. See mongod.

https://docs.mongodb.com/manual/replication/

【a group of MongoDB database server that maintain the same data set.】

replica set in MongoDB is a group of mongod processes that maintain the same data set. Replica sets provide redundancy and high availability, and are the basis for all production deployments. This section introduces replication in MongoDB as well as the components and architecture of replica sets. The section also provides tutorials for common tasks related to replica sets.

关闭mongodb 集群的更多相关文章

  1. mongodb集群安装及到现在遇到的一些问题

    集群搭建 只有3台服务器,开始搭建mongodb集群里主要参照的是http://www.lanceyan.com/tech/arch/mongodb_shard1.html,端口的设置也是mongos ...

  2. 搭建高可用mongodb集群(四)—— 分片(经典)

    转自:http://www.lanceyan.com/tech/arch/mongodb_shard1.html 按照上一节中<搭建高可用mongodb集群(三)-- 深入副本集>搭建后还 ...

  3. [转]搭建高可用mongodb集群(四)—— 分片

    按照上一节中<搭建高可用mongodb集群(三)—— 深入副本集>搭建后还有两个问题没有解决: 从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大? 数据压力大到机器支撑不了的 ...

  4. 搭建高可用mongodb集群(四)—— 分片

    按照上一节中<搭建高可用mongodb集群(三)—— 深入副本集>搭建后还有两个问题没有解决: 从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大? 数据压力大到机器支撑不了的 ...

  5. MongoDB集群架构及搭建

    MongoDB分布式集群 MongDB分布式集群能够对数据进行备份,提高数据安全性,以及提高集群提高读写服务的能力和数据存储能力.主要通过副本集(replica)对数据进行备份,通过分片(shardi ...

  6. 搭建高可用mongodb集群(四)—— 分片

    按照上一节中<搭建高可用mongodb集群(三)-- 深入副本集>搭建后还有两个问题没有解决: 从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大? 数据压力大到机器支撑不了的 ...

  7. 搭建mongodb集群(副本集+分片)

    搭建mongodb集群(副本集+分片) 转载自:http://blog.csdn.net/bluejoe2000/article/details/41323051 完整的搭建mongodb集群(副本集 ...

  8. 搭建高可用mongodb集群—— 分片

    从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大? 数据压力大到机器支撑不了的时候能否做到自动扩展? 在系统早期,数据量还小的时候不会引起太大的问题,但是随着数据量持续增多,后续迟早会出 ...

  9. Mongodb 集群搭建以及常见错误

    Mongodb 集群搭建以及常见错误 1 关于Replica Sets +Sharding(主从复制加分片)搭建,不这详细去说,网上有很多,大部分的例子就三台服务器之间做主从复制,分2个shard,架 ...

随机推荐

  1. rsync同步命令

     rsync同步时,--delete删除目标目录比源目录多余文件的方法1 .实例说明 服务器A上同步/tmp/work目录到远程服务器B的/tmp/work目录下, 同时删除B服务器/tmp/work ...

  2. 安卓手机 HTML5 手机页面 输入表单被键盘遮挡住了

    TML5 手机页面 输入表单被键盘遮挡住了 请问 大神 怎么 js 或者 JQ 判断安卓手机软键盘的键盘隐藏键按下去了? 有使用 uexWindow 方法 能判断到确定键 是 13 但是不知道这个键的 ...

  3. python 列表 字符串 转换

    列表转字符串python中的列表l = ['1','2','3','4']转成str型'1,2,3,4'','.join(l)这个方法,列表里都是字符串的话可以这样用.列表里是整数的情况可以用: &g ...

  4. cf468B Two Sets

    Little X has n distinct integers: p1, p2, ..., pn. He wants to divide all of them into two sets A an ...

  5. R语言入门视频笔记--3-1--矩阵与数组

    生成一个新矩阵,多用一些参数吧这次: x <- c(12,13,14,15) rname <- c("R1","R2") nname <- c ...

  6. hdu3987,最小割时求最少割边数

    题意:求最小割时候割边最少的数量.算法:先求dinic一遍,跑出残网络,再把该网络中满流量(残量为0)的边 残量改为1,其他边残量改为无穷,则再跑一次最大流,所得即为答案.(思,最小割有喝多组,但是要 ...

  7. AC日记——L国的战斗之间谍 洛谷 P1916

    题目背景 L国即将与I国发动战争!! 题目描述 俗话说的好:“知己知彼,百战不殆”.L国的指挥官想派出间谍前往I国,于是,选人工作就落到了你身上. 你现在有N个人选,每个人都有这样一些数据:A(能得到 ...

  8. Windows下使用Nexus搭建Maven私服(安装)

    一.下载Nexus 下载OSS最新版:https://www.sonatype.com/download-oss-sonatype 老版本:https://support.sonatype.com/h ...

  9. [转] SQL Server中变量的声明和使用方法

    原文地址 SQL Server中变量的声明和使用方法 声明局部变量语法: DECLARE @variable_name DataType 其中 variable_name为局部变量的名称,DataTy ...

  10. Xib/Storyboard碰到不同版本的Xcode真是想死啊!

    Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/ ...