2019年5月22日

Linux生成私钥和公钥免密连接

摘要: A为本地主机(即用于控制其他主机的机器) ; B为远程主机(即被控制的机器Server), 假如ip为172.24.253.2 ; A和B的系统都是Linux 在A上的命令: # ssh-keygen -t rsa (连续三次回车,即在本地生成了公钥和私钥,不设置密码) # ssh root@172 阅读全文

posted @ 2019-05-22 20:15 ExplorerMan 阅读(372) 评论(0) 推荐(0)

mongo 慢查询配置

摘要: 我是分片部署,所以慢查询相关的配置是在启动片服务上。 执行查询命令,是在share的primary 上。 1. mongodb慢查询 配置 慢查询数据主要存储在 local库的system.profile集合,该集合主要是一个capped collection。 开启方式两种: 第一种:片服务启动时 阅读全文

posted @ 2019-05-22 19:00 ExplorerMan 阅读(371) 评论(0) 推荐(0)

监控Mongo慢查询

摘要: 监控Mongo慢查询 1. 使用mongostat监控MongoDB全局情况 mongostat是mongdb自带的状态检测工具,在命令行下使用。它会间隔固定时间获取MongoDB的当前运行状态,并输出。 mongostat是mongdb自带的状态检测工具,在命令行下使用。它会间隔固定时间获取Mon 阅读全文

posted @ 2019-05-22 18:50 ExplorerMan 阅读(395) 评论(0) 推荐(0)

MongoDB 3.6 开启慢查询

摘要: 参考:Profiling Levels:支持一下级别。0 默认的profiler level,profiler 关闭并且不收集数据。1 profiler 收集超过slowms的操作数据。2 profiler 收集所有的数据。 设置收集数据:设置级别为1,慢查询标准为200ms. rs0:PRIMAR 阅读全文

posted @ 2019-05-22 18:39 ExplorerMan 阅读(275) 评论(0) 推荐(0)

解决“/bin/bash^M: bad interpreter: No such file or directory”

摘要: 在执行shell脚本时提示这样的错误主要是由于shell脚本文件是dos格式,即每一行结尾以\r\n来标识,而unix格式的文件行尾则以\n来标识。 查看脚本文件是dos格式还是unix格式的几种办法。(1)cat -A filename 从显示结果可以判断,dos格式的文件行尾为^M$,unix格 阅读全文

posted @ 2019-05-22 16:45 ExplorerMan 阅读(331) 评论(0) 推荐(0)

用shell脚本实现MongoDB数据库自动备份

摘要: 一、创建MongoDB备份目录 用来存放数据 mkdir -p /data/mongodb_bak/mongodb_bak_now mkdir -p /data/mongodb_bak/mongodb_bak_list mkdir -p /data/mongodb_bak/mongodb_bak_l 阅读全文

posted @ 2019-05-22 16:44 ExplorerMan 阅读(1150) 评论(0) 推荐(0)

导航