当前位置:网站首页>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 15000
Create 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-replicas
192.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-cli
4. 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
边栏推荐
猜你喜欢
MySQL最大建议行数2000w, 靠谱吗?
70后夫妻给苹果华为做“雨衣”,三年进账7.91亿
Ant discloses the open source layout of core basic software technology for the first time
珠海市生物安全P3实验室主体结构封顶
MySQL's maximum recommended number of rows is 2000w, is it reliable?
Meeting OA project (6) --- (to-be-opened meeting, historical meeting, all meetings)
华盛顿大学、Allen AI 等联合 | RealTime QA: What's the Answer Right Now?(实时 QA:现在的答案是什么?)
js邯郸市地图网页源码下载
2022年7月最热的10篇AI论文
如何防止重复下单?
随机推荐
【无标题】
使用Canvas实现网页鼠标签名效果
Spark: Cluster Computing with Working Sets
软件测试谈薪技巧:同为测试人员,为什么有人5K,有人 20K?
ESP8266-Arduino编程实例-MLX90614红外测温传感器驱动
mysql 面试题
OpenCV-resize函数「建议收藏」
DOM系列之classList属性
【建议收藏】技术面必考题:多线程、多进程
首席工程师究竟是怎样的存在?
05 doris 集群搭建
uwsgi配置文件启动
Ali's official Redis development specification
LeetCode第 303 场周赛
高薪程序员&面试题精讲系列131之Eureka如何实现高可用?自我保护机制是怎么回事?
DOM系列之触屏事件
指针进阶(三)之指针与数组笔试题
请问nacos 连接mysql失败后会重新连接吗?
南京科技大学、中国电子科技第28研究所等联合|MLRIP: Pre-training a military language representation model with informative factual knowledge and professional knowledge base(预训练具有丰富事实知识和专业知识库的军事语言表示模型)
谁还敢买影视股?