当前位置:网站首页>06 redis cluster structures
06 redis cluster structures
2022-08-01 16:35:00 【blue wind 9】
Foreword
Ha ha recently there are a series of related requirements for environment construction
Record it
redis three nodes: 192.168.110.7, 192.168.110.8
7 open three redis instances, 8 open three redis instances
All three machines are trusted shell
redis is based on 5.0.8
Redis cluster building
redis two nodes: 192.168.110.7, 192.168.110.8
1. Basic environment preparation
192.168.110.7, 192.168.110.8 Install jdk on it, upload the redis installation package
The installation package is from Download | Redis
2. redis configuration adjustment
Sample 7001's configuration file below, 7001 - 7006's configuration file is similar
[[email protected] redis-5.0.8]# cat redis_7001.confprotected-mode noport 7001daemonize yessupervised nopidfile /var/run/redis_7001.pidlogfile "/var/log/redis/redis_7001.log"dir /meiya/data/redis/redis_7001appendonly yesappendfsync alwayscluster-enabled yescluster-config-file nodes_7001.confcluster-node-timeout 15000Create startCluster.sh on 192.168.110.7 and 192.168.110.8 respectively
192.168.110.7 is as follows
./bin/redis-server ./redis_7001.conf./bin/redis-server ./redis_7002.conf./bin/redis-server ./redis_7003.conf#./bin/redis-server ./redis_7004.conf#./bin/redis-server ./redis_7005.conf#./bin/redis-server ./redis_7006.conf#./bin/redis-cli --cluster create 192.168.110.7:7001 192.168.110.7:7002 192.168.110.7:7003 192.168.110.8:7004 192.168.110.8:7005 192.168.110.8:7006 --cluster-replicas192.168.110.8 is as follows
# ./bin/redis-server ./redis_7001.conf# ./bin/redis-server ./redis_7002.conf# ./bin/redis-server ./redis_7003.conf./bin/redis-server ./redis_7004.conf./bin/redis-server ./redis_7005.conf./bin/redis-server ./redis_7006.conf./bin/redis-cli --cluster create 192.168.110.7:7001 192.168.110.7:7002 192.168.110.7:7003 192.168.110.8:7004 192.168.110.8:7005 192.168.110.8:7006 --cluster-redis-cli4. Start the cluster
Execute startCluster.sh on 192.168.110.7
Then execute startCluster.sh on 192.168.110.8
If there is no exception, the cluster will start successfully
Test cluster
[[email protected] redis-5.0.8]# ./bin/redis-cli -p 7004 -c127.0.0.1:7004> get name-> Redirected to slot [5798] located at 192.168.110.7:7003"jerry"192.168.110.7:7003> get name"jerry"192.168.110.7:7003> set name zerryOK192.168.110.7:7003> get name"zerry"192.168.110.7:7003>End
边栏推荐
猜你喜欢

Slider/Carousel图片切换支持触摸屏

HashCode technology insider interview must ask

阿里官方 Redis 开发规范

MySQL最大建议行数2000w, 靠谱吗?

完全背包问题求组合数和排列数

ECCV 2022 | Poseur:你以为我是姿态估计,其实是目标检测哒

pynlpir更新license Error: unable to fetch newest license解决方案

Using Canvas to achieve web page mouse signature effect

How to Efficiently Develop Jmix Extension Components

暑气渐敛,8月让我们开源一夏!
随机推荐
AntDB数据库亮相24届高速展,助力智慧高速创新应用
第一次改开源中间件keycloak总个结
网站备案后没有找到站点 您没有将此域名或IP绑定到对应站点! 配置文件未生效!
我的新书销量1万册了!
全新升级!《云原生架构白皮书 2022 版》重磅发布
C#的FTP帮助类
ESP8266-Arduino编程实例-GA1A12S202对数刻度模拟光传感器
七夕到了——属于程序员的浪漫
二分练习题
AI艺术‘美丑’不可控?试试 AI 美学评分器~
mysql源码分析——聚簇索引
2022年7月最热的10篇AI论文
面对营销难,有米云指出一条破局之路
完全背包问题求组合数和排列数
谁还敢买影视股?
A full review of mainstream timed task solutions
酷逼了 Pathetic Dog 第 304 场周赛
中国驻西班牙使馆再次提醒留学人员注意暑期安全
MySQL最大建议行数2000w, 靠谱吗?
PAT 甲级 A1030 Travel Plan