![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
redis
温柔散尽
技术让生活更美好
展开
-
Redis集群本地搭建-MAC
1、安装redisbrew install redis安装后的目录在/opt/homebrew/celler/redis配置文件在 /opt/homebrew/etc下面2、修改配置文件此处根据redis.conf文件复制出4个配置文件,3个主节点,1个从节点。修改端口号 port ,分别为7000、7001、7002、7003修改cluster-enabled为yes修改rdb保存目录为对应的端口号,dir /opt/homebrew/var/db/redis/redis-7000原创 2021-09-08 15:32:33 · 258 阅读 · 0 评论 -
Redis集群中给节点批量指定slot脚本
Redis集群中给节点批量指定slot脚本#!/bin/sh# 起始槽begin_slot=$1# 终点槽end_slot=$2# ipm_host=$3# 端口m_port=$4for((i=$begin_slot;i<=$end_slot;i++));do m_slot="${m_slot} ${i}"doneecho “add slots from ${begin_slot} to ${end_slot}!”redis-cli -h ${m_host} -p原创 2021-09-07 11:46:11 · 462 阅读 · 1 评论