标签:erro sha items git http redis集群 color card orb
git地址: https://github.com/joyieldInc/predixy 编译文件地址: https://github.com/joyieldInc/predixy/releases/download/1.0.5/predixy-1.0.5-bin-amd64-linux.tar.gz
编辑conf/predixy.conf
Bind 127.0.0.1:7617 Include sentinel.conf # Include try.conf
编辑conf/sentinel.conf
复制一份 Examples中SentinelServerPool 光标定位复制行 :.,$y 回车复制 大GNP粘贴 去掉# :.,$s/#// 配置: Sentinels { + 127.0.0.1:26379 + 127.0.0.1:26380 + 127.0.0.1:26381 } Group shard001 { } Group shard002 { } Sentinels 代表三台哨兵 shard001 、shard002 代表两套主从的主
配置对应三台哨兵
vi 26379.conf port 26379 sentinel monitor shard001 127.0.0.1 36379 1 sentinel monitor shard002 127.0.0.1 46379 1 vi 26380.conf port 26380 sentinel monitor shard001 127.0.0.1 36379 2 sentinel monitor shard002 127.0.0.1 46379 2 vi 26381.conf port 26381 sentinel monitor shard001 127.0.0.1 36379 2 sentinel monitor shard002 127.0.0.1 46379 2 说明: 26379、26380、26381三台哨兵监控主36379/46379
启动
1.启动三台哨兵 redis-server 26379.conf --sentinel redis-server 26380.conf --sentinel redis-server 26381.conf --sentinel 2.启动两套主从 mkdir 36379 mkdir 36380 mkdir 46379 mkdir 46380 redis-server --port 36379 redis-server --port 36380 --replicaof 127.0.0.1 36379 redis-server --port 46379 redis-server --port 46380 --replicaof 127.0.0.1 46379 3.启动joyieldinc代理(进入src) ./predixy ../conf/predixy.conf
测试代理:
[root@redis2 ~]# redis-cli -p 7617 127.0.0.1:7617> set k1 aa OK 127.0.0.1:7617> set k2 bb OK 127.0.0.1:7617> set xiaoke 03 OK 127.0.0.1:7617> key * (error) ERR unknown command ‘key‘ 127.0.0.1:7617> watch k1 (error) ERR forbid transaction in current server pool 127.0.0.1:7617> multi (error) ERR forbid transaction in current server pool 127.0.0.1:7617>
测试主36379/36380
[root@redis2 ~]# redis-cli -p 36379 127.0.0.1:36379> keys * 1) "k1"
测试主46379/46380
[root@redis2 ~]# redis-cli -p 46380 127.0.0.1:46380> keys * 1) "k2" 2) "xiaoke"
标签:erro sha items git http redis集群 color card orb
原文地址:https://www.cnblogs.com/bigdata-familyMeals/p/14317416.html