SSDB主从复制
SSDB主从复制
从:
# cat /usr/local/ssdb/ssdb.conf
server: ip: 192.168.16.202 #修改 port: 8888 #修改 # bind to public ip #ip: 0.0.0.0 # format: allow|deny: all|ip_prefix # multiple allows or denys is supported #deny: all allow: 127.0.0.1 #修改 allow: 192.168 #修改
主:
# cat /usr/local/ssdb/ssdb.conf
server: ip: 192.168.16.201 #修改 port: 8888 #修改 # bind to public ip #ip: 0.0.0.0 # format: allow|deny: all|ip_prefix # multiple allows or denys is supported #deny: all allow: 127.0.0.1 #修改 allow: 192.168 #修改 replication: binlog: yes # Limit sync speed to *MB/s, -1: no limit sync_speed: -1 slaveof: # to identify a master even if it moved(ip, port changed) # if set to empty or not defined, ip:port will be used. id: svc_2 #修改 # sync|mirror, default is sync type: sync #修改 ip: 192.168.16.202 #修改 port: 8888 #修改
主从:
#./ssdb-server -d ssdb.conf
主从:
# /usr/local/ssdb/ssdb-cli -h 192.168.16.201 -p 8888
# /usr/local/ssdb/ssdb-cli -h 192.168.16.202 -p 8888
启动参数:
-Dapplication.ssdb.master.host=192.168.16.202 -Dapplication.ssdb.master.port=8888 -Dapplication.ssdb.slave.host=192.168.16.201 -Dapplication.ssdb.slave.port=8888
参考:
http://ssdb.io/docs/install.html
http://my.oschina.net/u/1019119/blog/263310
本文出自 “不作恶” 博客,请务必保留此出处http://vflong.blog.51cto.com/8622347/1546596
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。