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
原文地址:http://vflong.blog.51cto.com/8622347/1546596