mongodb复制集配置

#more /opt/mongodb3.0/mongodb_im_conf_47020/mongodb3.0_im_47020.cnf

dbpath = /opt/mongodb3.0/mongodb_im_data_47020/ # 指定数据库路径
logpath = /opt/mongodb3.0/mongodb_im_log_47020/mongodb.log # 日志路径
logappend = true # 以追加的方式写日志
port = 47020 # 指定端口号,默认47020
fork = true # 以子进程方式运行
quiet = true # disables all but the most critical entries in output/log file.
auth = true # 增加验证选项
#bind_ip = 127.0.0.1,172.18.12.2,172.18.12.3
keyFile=/opt/mongodb3.0/keyFile
directoryperdb = true # 每个db 存放在单独的目录中
wiredTigerDirectoryForIndexes = true
maxConns = 1000000
nohttpinterface = true
rest = false
profile=1
slowms=1000
storageEngine=wiredTiger
###Replication Options
replSet = im
oplogSize = 4096

 

#more /opt/mongodb3.0/mongodb_im_conf_47018/mongodb3.0_im_47018.cnf
dbpath = /opt/mongodb3.0/mongodb_im_data_47018/ # 指定数据库路径
logpath = /opt/mongodb3.0/mongodb_im_log_47018/mongodb.log # 日志路径
logappend = true # 以追加的方式写日志
port = 47018 # 指定端口号,默认47018
fork = true # 以子进程方式运行
quiet = true # disables all but the most critical entries in output/log file.
auth = true # 增加验证选项
#bind_ip = 127.0.0.1,172.18.12.2,172.18.12.3
keyFile=/opt/mongodb3.0/keyFile
directoryperdb = true # 每个db 存放在单独的目录中
wiredTigerDirectoryForIndexes = true
maxConns = 1000000
nohttpinterface = true
rest = false
profile=1
slowms=1000
storageEngine=wiredTiger
###Replication Options
replSet = im
oplogSize = 4096

 

#more /opt/mongodb3.0/mongodb_im_conf_47019/mongodb3.0_im_arbiter_47019.cnf
dbpath = /opt/mongodb3.0/mongodb_im_data_arbiter_47019/ # 指定数据库路径
logpath = /opt/mongodb3.0/mongodb_im_log_arbiter_47019/mongodb.log # 日志路径
logappend = true # 以追加的方式写日志
port = 47019 # 指定端口号,默认47019
fork = true # 以子进程方式运行
quiet = true # disables all but the most critical entries in output/log file.
auth = true # 增加验证选项
#bind_ip = 127.0.0.1,172.18.12.2,172.18.12.3
keyFile=/opt/mongodb3.0/keyFile
directoryperdb = true # 每个db 存放在单独的目录中
wiredTigerDirectoryForIndexes = true
maxConns = 1000000
nohttpinterface = true
rest = false
profile=1
slowms=1000
storageEngine=wiredTiger
###Replication Options
replSet = im
oplogSize = 4096

 

#more keyFile
this is a key file created by zhangyb used to auth by replica set members each OTHER

 

#ps -ef | grep mongodb
root 1601 1 0 2015 ? 1-15:45:22 /var/mongodb3.0/bin/mongod --config /opt/mongodb3.0/mongodb_im_conf_47018/mongodb3.0_im_47018.cnf
root 1622 1 0 2015 ? 21:02:42 /var/mongodb3.0/bin/mongod --config /opt/mongodb3.0/mongodb_im_conf_47019/mongodb3.0_im_arbiter_47019.cnf
root 1709 1 0 2015 ? 1-13:18:03 /var/mongodb3.0/bin/mongod --config /opt/mongodb3.0/mongodb_im_conf_47020/mongodb3.0_im_47020.cnf

ohu 4309 1 0 2015 ? 20:58:04 /opt/mongodb_one/mongodb/bin/mongod --port 27027 --dbpath /opt/mongodb_one/data/27027 --logpath /opt/mongodb_one/data/logs/27027.log --logappend --fork --nojournal --maxConns 20000

 

转载于:https://www.cnblogs.com/hujihon/p/5212233.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值