rs.initiate({_id:"shard1RS",members:[{_id:1,host:"127.0.0.1:27018",priority:2},{_id:2,host:"127.0.0.1:37018"},{_id:3,host:"127.0.0.1:47018"}]})
rs.initiate({_id:"shard2RS",members:[{_id:1,host:"127.0.0.1:37019",priority:2},{_id:2,host:"127.0.0.1:27019"},{_id:3,host:"127.0.0.1:47019"}]})
rs.initiate({_id:"shard3RS",members:[{_id:1,host:"127.0.0.1:47010",priority:2},{_id:2,host:"127.0.0.1:27010"},{_id:3,host:"127.0.0.1:37010"}]})

rs.initiate({_id:"configRS",configsvr:true,members:[{_id:1,host:"127.0.0.1:27017",priority:2},{_id:2,host:"127.0.0.1:37017"},{_id:3,host:"127.0.0.1:47017"}]})

rs.status();

./mongod -f /home/jason/liuguanghui/mongo/shard/shard1.config

use admin
db.runCommand({"addShard":"shard1RS/127.0.0.1:27018" ,"maxsize":1024})
db.runCommand({"addShard":"shard2RS/127.0.0.1:37019" ,"maxsize":1024})
db.runCommand({"addShard":"shard3RS/127.0.0.1:47010" ,"maxsize":1024})

./mongos -configdb configRS/127.0.0.1:27017,127.0.0.1:37017,127.0.0.1:47017 -port 17018 -fork -logpath=/home/jason/liuguanghui/mongo2/router/logs/mongos.log
./mongos -configdb configRS/127.0.0.1:27017,127.0.0.1:37017,127.0.0.1:47017 -port 17018 -fork -logpath=/home/jason/liuguanghui/mongo2/router/logs/mongos.log

ps -ef|grep "./mongod -f /home/jason/liuguanghui/mongo"|grep -v grep|cut -c 9-15|xargs kill -9
ps -ef|grep "mongo"|grep -v grep|cut -c 9-15|xargs kill -9

sudo vi /opt/mongodb/mms/conf/conf-mms.properties
sudo service mongodb-mms start

ps -ef |grep mongo
jason 3153 1645 0 1月24 ? 00:05:29 ./mongod --config /home/jason/liuguanghui/mongo/config/mongo.config
jason 3381 1645 0 1月24 ? 00:05:31 ./mongod --config /home/jason/liuguanghui/mongo2/config/mongo.config
jason 3503 1645 0 1月24 ? 00:05:07 ./mongod --config /home/jason/liuguanghui/mongo3/config/mongo.config
root 9219 1645 0 13:48 ? 00:00:04 ./mongos -configdb configRS/127.0.0.1:27017,127.0.0.1:37017,127.0.0.1:47017 -port 17017 -fork -logpath=/home/jason/liuguanghui/mongo/router/logs/mongos.log
root 9262 1645 0 13:50 ? 00:00:04 ./mongos -configdb configRS/127.0.0.1:37017,127.0.0.1:27017,127.0.0.1:47017 -port 17018 -fork -logpath=/home/jason/liuguanghui/mongo2/router/logs/mongos.log
jason 9341 1645 0 13:53 ? 00:00:16 ./mongod -f /home/jason/liuguanghui/mongo/shard/shard1.config
jason 9433 1645 0 13:53 ? 00:00:17 ./mongod -f /home/jason/liuguanghui/mongo2/shard/shard1.config
jason 9525 1645 0 13:54 ? 00:00:20 ./mongod -f /home/jason/liuguanghui/mongo3/shard/shard1.config
jason 9619 1645 0 13:54 ? 00:00:15 ./mongod -f /home/jason/liuguanghui/mongo/shard/shard2.config
jason 9729 1645 0 13:54 ? 00:00:16 ./mongod -f /home/jason/liuguanghui/mongo/shard/shard3.config
jason 9826 1645 0 13:54 ? 00:00:16 ./mongod -f /home/jason/liuguanghui/mongo2/shard/shard2.config
jason 9939 1645 0 13:54 ? 00:00:16 ./mongod -f /home/jason/liuguanghui/mongo2/shard/shard3.config
jason 10071 1645 0 13:54 ? 00:00:14 ./mongod -f /home/jason/liuguanghui/mongo3/shard/shard2.config
jason 10191 1645 0 13:54 ? 00:00:15 ./mongod -f /home/jason/liuguanghui/mongo3/shard/shard3.config
mongodb+ 10939 1645 4 14:05 ? 00:01:35 /opt/mongodb/mms/jdk/bin/mms-app -d64 -Xss228k -Xmx4352m -Xms4352m -XX:NewSize=600m -Xmn1500m -XX:ReservedCodeCacheSize=128m -XX:-OmitStackTraceInFastThrow -Dxgen.webServerGzipEnabled=true -Duser.timezone=GMT -Dfile.encoding=UTF-8 -Dsun.net.client.defaultReadTimeout=20000 -Dsun.net.client.defaultConnectTimeout=10000 -Dorg.eclipse.jetty.util.UrlEncoding.charset=UTF-8 -Dorg.eclipse.jetty.server.Request.maxFormContentSize=4194304 -Dserver-env=hosted -Dapp-id=mms -Dbase-port=8080 -Dbase-ssl-port=8443 -Dapp-dir=/opt/mongodb/mms -Dxgen.webServerReuseAddress=true -Dmms.keyfile=/etc/mongodb-mms/gen.key -XX:SurvivorRatio=12 -XX:MaxTenuringThreshold=15 -XX:CMSInitiatingOccupancyFraction=62 -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+UseBiasedLocking -XX:+CMSParallelRemarkEnabled -XX:-OmitStackTraceInFastThrow -classpath /opt/mongodb/mms/classes/mms.jar:/opt/mongodb/mms/agent:/opt/mongodb/mms/agent/backup:/opt/mongodb/mms/agent/monitoring:/opt/mongodb/mms/agent/automation:/opt/mongodb/mms/agent/biconnector:/opt/mongodb/mms/data/unit:/opt/mongodb/mms/conf/:/opt/mongodb/mms/lib/* -Dlog_path=/opt/mongodb/mms/logs/mms0 -Dinstance-id=0 -Dpid-filename=/opt/mongodb/mms/tmp/mms-0.pid com.xgen.svc.core.ServerMain
mongodb+ 13967 1645 2 14:21 ? 00:00:30 /opt/mongodb/mms/jdk/bin/mms-app -DMONGO.BIN.PREFIX= -Dserver-env=hosted -Dapp-id=bgrid -Dapp-dir=/opt/mongodb/mms -Dlog_path=/opt/mongodb/mms/logs/daemon -Dmms.extraPropFile=conf-mms.properties -DDAEMON.ROOT.DIRECTORY= -Dnum.workers= -DDAEMON.BASE.PORT=27500 -DDAEMON.QUERYABLE.FS.PORT=8087 -DDAEMON.QUERYABLE.BASE_PORT=27700 -DDAEMON.QUERYABLE.MAX_MOUNTS=20 -DDAEMON.MONGODB.RELEASE.DIR= -Dmms.keyfile=/etc/mongodb-mms/gen.key -Dpid-filename=/opt/mongodb/mms/tmp/bgrid-0.pid -classpath /opt/mongodb/mms/classes/mms.jar:/opt/mongodb/mms/conf/:/opt/mongodb/mms/lib/* com.xgen.svc.brs.grid.Daemon
jason 14266 2626 0 14:40 pts/4 00:00:00 grep --color=auto mongo

自己玩虚拟机上mongo备份的更多相关文章

  1. 云计算之路-试用Azure:数据库备份压缩文件在虚拟机上的恢复速度测试

    测试环境:Windows Azure上海机房,虚拟机配置为大型(四核,7 GB 内存),磁盘情况见下图. 数据库备份压缩文件大于为12.0 GB (12,914,327,552 bytes),放置于T ...

  2. 虚拟机上安装ArchLinux笔记

    安装前的自白: 想使用ArchLinux,就直接在虚拟机上先装一个玩起来先.虚拟机使用的是Vmware,下载免费的个人版本就可以了. Arch Linux的版本为2016.4.1 内核为4.4.5 在 ...

  3. 【转载】Linux小白福利:《超容易的Linux系统管理入门书》(三)在虚拟机上安装Linux

    本篇是Linux小白最佳实践第3篇,目的就是让白菜们自己动手安装个Linux玩玩.如果你是Linux小白,请务必亲自动手来安装.不想安装多个操作系统的,虚拟机是最佳选择,一台电脑上可以用虚拟机安装7. ...

  4. 在虚拟机上安装gho、esd(wim)系统镜像文件

    gho.esd(wim)等文件不能被虚拟机识别,但如果把它们打包成iso就可以了. 另外,还需用到能在虚拟机上运行的WinPE的iso文件,本文用的是微PE. 注意:安装虚拟机提示operating ...

  5. Azure 虚拟机上的 SQL Server 常见问题

    本主题提供有关运行 Azure 虚拟机中的 SQL Server 时出现的一些最常见问题的解答. 如果本文未解决你的 Azure 问题,请访问 MSDN 和 CSDN 上的 Azure 论坛. 你可以 ...

  6. 在 Azure 虚拟机上快速搭建 MongoDB 集群

    MongoDB 是目前在 NoSQL 市场上非常受欢迎的一个数据库,本文介绍如何使用 Azure PowerShell 和 Azure CLI 在 Azure 虚拟机上搭建单节点 MongoDB(测试 ...

  7. 虚拟机上的Linux学习

    title: 虚拟机上的Linux学习 date: 2018-08-08 15:48:28 updated: tags: [Linux,学习笔记] description: keywords: com ...

  8. 虚拟机上的企业网络管理系统(cisco works 2000安装配置)

    虚拟机上的企业网络管理系统 北京 李晨光 相关文章 Cisco Works 2000 网络管理软件安装.配置全过程 http://you.video.sina.com.cn/b/18168631-14 ...

  9. 在VM虚拟机上安装Microsoft Dynamics CRM 2016 步骤图解及安装注意事项

    安装Dynamics CRM 2016环境配置要求: 系统版本:Windows Server 2012 R2(必须) SQL 版本: SQLServer2014SP1-FullSlipstream-x ...

随机推荐

  1. while 小项目练习

    # (1) 用双层while 写十行十列小星星 j = 0 while j < 10: #打印一行十个小星星 i = 0 while i <10: print("*", ...

  2. linux性能评估与分析工具---CPU篇

    一. uptime root@calm:~# uptime :: up days, :, user, load average: 0.04, 0.09, 0.04 这里主要关注load average ...

  3. 2016级算法第三次上机-E.ModricWang's Polygons

    930 ModricWang's Polygons 思路 首先要想明白,哪些多边形可能是格点正多边形? 分情况考虑: 三角形不可能,因为边长为有理数的正三角形的面积为无理数,而格点三角形的面积为有理数 ...

  4. 获取dataGridView双击时判断双击的是下面的行,还是列头

    private void dataGridView1_DoubleClick(object sender, EventArgs e) { Point hit = this.dataGridView1. ...

  5. P4027 [NOI2007]货币兑换

    传送门 首先有一个显然的贪心,每次操作都要做到底,为了最优不会出现只卖一部分或者只买一部分的操作 所以设 $f[i]$ 表示前 $i$ 天得到的最大价值,那么对于每一个 $i$,枚举所有 $j< ...

  6. @RequestMapping的value属性

    package com.zby.controller; import javax.servlet.http.HttpServletRequest; import org.springframework ...

  7. C语言字符串的操作

    C语言字符串操作函数 1. 字符串反转 - strRev2. 字符串复制 - strcpy3. 字符串转化为整数 - atoi4. 字符串求长 - strlen5. 字符串连接 - strcat6. ...

  8. 4G模块在AM335x上的移植

    关于4G模块的移植  看到一个很实用的写的比较好的   借鉴一下 参考:https://e2echina.ti.com/question_answer/dsp_arm/sitara_arm/f/25/ ...

  9. CDH集群安装配置(六)CDH agent

    在线安装 sudo yum install cloudera-manager-agent cloudera-manager-daemons 离线安装 上传三个server的资源包到cdh1节点上(所有 ...

  10. zipimport.ZipImportError: can't find module 'encodings'

    环境说明:windows 7.python 3.7.0.pyinstaller 3.1. 解决方案:升级pyinstaller 到 3.4.