当前位置:网站首页>Container configuration starts redis cluster single machine 6 nodes 3 Master 3 slave
Container configuration starts redis cluster single machine 6 nodes 3 Master 3 slave
2022-07-28 22:31:00 【5xp_ two thousand and one】
OS:CentOS Linux release 7.9.2009 (Core)
docker-ce-20.10.12-3.el7.x86_64
1. Create cluster network card
docker network create redis --subnet 172.38.0.0/16
2. create profile
for port in $(seq 1 6);
do
mkdir -p /mydata/redis/node-${port}/conf
touch /mydata/redis/node-${port}/conf/redis.conf
cat <<EOF>/mydata/redis/node-${port}/conf/redis.conf
port 6379
bind 0.0.0.0
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
cluster-announce-ip 172.38.0.1${port}
cluster-announce-port 6379
cluster-announce-bus-port 16379
appendonly yes
EOF
done
3. Start the container Start in turn , A total of 6 individual :
docker run -p6371:6379 -p16371:16379 --name redis-1 \
-v /mydata/redis/node-1/data:/data \
-v /mydata/redis/node-1/conf/redis.conf:/etc/redis/redis.conf \
-d --net redis --ip 172.38.0.11 redis:5.0.9-alpine3.11 redis-server /etc/redis/redis.conf
docker run -p6376:6379 -p16376:16379 --name redis-6 \
-v /mydata/redis/node-6/d
边栏推荐
- [LiteratureReview]Object Detection and Mapping with Bounding Box Constraints
- SQL injection less38 (Stack Injection)
- HCIP(9)
- Overall introduction of Ruiji takeout project
- 普源示波器实际的使用效果怎么样
- 2021 mathematical modeling group B exercise
- ATT&CK初步了解
- SSH password free login
- vuejs中如何实现动态路由切换及路由的缓存
- 容器化配置启动redis集群 单机6节点 3主3从
猜你喜欢
Ruiji takeout project - development of business development function Day2
普源示波器实际的使用效果怎么样
imx6q gpio复用
6K6w5LiA5qyh5pS75Ye75YiG5p6Q
6K6w5LiA5qyh5pS75Ye75YiG5p6Q
SQL injection less34 (post wide byte injection + Boolean blind injection)
Sword finger offer II 054. Sum of all values greater than or equal to nodes (medium binary search tree DFS)
How about the actual use effect of common source oscilloscope
Lin Xiaobin, head of Tencent cloud database, borrowed 100 million yuan to speculate in stocks? Insider: the amount is not true
示波器发展史中的变化
随机推荐
Closure, prototype and original link
MySQL command (add, delete, check and modify)
Sword finger offer II 053. Medium order successor in binary search tree (medium binary search tree DFS)
Chrome encountered a problem when debugging the code. After modifying and saving the code in vscode, chrome did not update after refreshing
2022年一级建造师考试什么时候才能报名?
Remember the first line segment tree (corresponding to Luogu 3372)
AWK空行过滤
HCIP(9)
SQL injection less38 (Stack Injection)
Summary of the use of hash table set and map when leetcode brushes questions
winServer运维技术栈
2021 mathematical modeling group B exercise
Win11怎么打开软件通知
乌官员:乌克兰一半农产品经多瑙河港口出口
PaddleNLP基于ERNIR3.0文本分类以CAIL2018-SMALL数据集罪名预测任务为例【多标签】
JS convert numbers to letters
Win11 how to open software notification
LVS+KeepAlived高可用部署实战应用
internet的基本服务中文件传输命令是哪个
微信小程序剪切图片的功能