当前位置:网站首页>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
边栏推荐
- 容器化配置启动redis集群 单机6节点 3主3从
- HCIP(9)
- CDN working principle
- HCIP(15)
- 6K6w5LiA5qyh5pS75Ye75YiG5p6Q
- ATT&CK 威胁情报
- Lin Xiaobin, head of Tencent cloud database, borrowed 100 million yuan to speculate in stocks? Insider: the amount is not true
- JMeter installs third-party plug-ins plugins Manager
- Alibaba cloud CDN practice
- HCIP(12)
猜你喜欢

成立不到一年!MIT衍生量子计算公司完成900万美元融资

Mysql内置函数

How to install WiFi correctly

HCIP(12)

静态成员static详解

软考网络工程师

Less than a year after its establishment! MIT derivative quantum computing company completed financing of US $9million

Ultra detailed visual studio 2019 running littlevgl (lvgl) simulator

SQL injection less38 (Stack Injection)

网易云信 2022Q2 产品补给站,快来获取你的产品补给计划吧!
随机推荐
20-09-27项目迁移到阿里折腾记录(网卡顺序导致服务无法通过haproxy连接到db)
CMD common commands
Static route and default route experiment
Excel-VBA 快速上手(十三、日期的常见用法)
Ruiji takeout project - development of business development function Day2
Day3 classification management of Ruiji takeout project
75. Color classification (medium array double pointer sorting)
Tensorflow serving high performance machine learning model service system
HCIP(9)
Sword finger offer II 058. schedule (medium design segment tree treemap ordered set)
Summary of common error types in JS
LeetCode刷题系列之-多数之和类型
Wechat applet uses canvas drawing, round avatar, network background, text, dotted line, straight line
There will be a black line on the border when the button in the wechat applet is clicked
JS implementation generates a random key of specified length
SQL injection less38 (Stack Injection)
HCIP(12)
How to realize dynamic route switching and route caching in vuejs
imx6q gpio复用
[Ruiji takeout project]day4 - dish management