redis-集群安装(2)变两重冗余为三重

接上述安装文档(1)添加slave节点添加的slave节点配置在另一个服务器上,首先配置config文件这里我们计算一下本来是两重冗余,8个节点集群,也就是一共16个conf文件现在是三重冗余,8个节点集群,也就是一共24个conf文件,现在要把他分配到4个主机上,也就是每个主机6个conf文件。也就是在原来的基础上增加两个conf文件此时就是有顺序的填数独
摘要由CSDN通过智能技术生成

接上述安装文档(1)

添加slave节点
添加的slave节点配置在另一个服务器上,首先配置config文件
这里我们计算一下
本来是两重冗余,8个节点集群,也就是一共16个conf文件
现在是三重冗余,8个节点集群,也就是一共24个conf文件,现在要把他分配到4个主机上,也就是每个主机6个conf文件。也就是在原来的基础上增加两个conf文件
此时就是有顺序的填数独


主机1
[ root@T1 config]# vi redis-26381.conf

include /tmp/redis-3.2.0/config/redis-common.conf
port 26381
logfile "/tmp/redis-3.2.0/log/redis-26381.log"
maxmemory 100m
# volatile-lru -> remove the key with an expire set using an LRU algorithm
# allkeys-lru -> remove any key accordingly to the LRU algorithm
# volatile-random -> remove a random key with an expire set
# allkeys-random -> remove a random key, any key
# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
# noeviction -> don't expire at all, just return an error on write operations
maxmemory-policy allkeys-lru
appendfilename "appendonly-26381.aof"
dbfilename dump-26381.rdb
dir /tmp/redis-3.2.0/data
cluster-config-file nodes-26381.conf
auto-aof-rewrite-percentage 80-100
[ root@T1 config]# vi redis-26384.conf

include /tmp/redis-3.2.0/config/redis-common.conf
port 26384
logfile "/tmp/redis-3.2.0/log/redis-26384.log"
maxmemory 100m
# volatile-lru -> remove the key with an expire set using an LRU algorithm
# allkeys-lru -> remove any key accordingly to the LRU algorithm
# volatile-random -> remove a random key with an expire set
# allkeys-random -> remove a random key, any key
# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
# noeviction -> don't expire at all, just return an error on write operations
maxmemory-policy allkeys-lru
appendfilename "appendonly-26384.aof"
dbfilename dump-26384.rdb
dir /tmp/redis-3.2.0/data
cluster-config-file nodes-26384.conf
auto-aof-rewrite-percentage 80-100
~                                   
主机2
[ root@T2 config]# vi redis-26382.conf

include /tmp/redis-3.2.0/config/redis-common.conf
port 26382
logfile "/tmp/redis-3.2.0/log/redis-26382.log"
maxmemory 100m
# volatile-lru -> remove the key with an expire set using an LRU algorithm
# allkeys-lru -> remove any key accordingly to the LRU algorithm
# volatile-random -> remove a random key with an expire set
# allkeys-random -> remove a random key, any key
# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
# noeviction -> don't expire at all, just return an error on write operations
maxmemory-policy allkeys-lru
appendfilename "appendonly-26382.aof"
dbfilename dump-26382.rdb
dir /tmp/redis-3.2.0/data
cluste
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值