当前位置:网站首页>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
边栏推荐
猜你喜欢

MLX90640 红外热成像仪测温模块开发笔记(完整版)

沈腾拯救暑期档

美国弗吉尼亚大学、微软 | Active Data Pattern Extraction Attacks on Generative Language Models(对生成语言模型的主动数据模式提取攻击)

DOM树jsjs特效代码

每日优鲜大败局

Use Canvas to implement mobile phone signature

js邯郸市地图网页源码下载

Rancher 部署 DataKit 最佳实践

工业制造行业的低代码开发平台思维架构图

Good guy, the company server just crashed!
随机推荐
Good guy, the company server just crashed!
Vulnhub靶机:HARRYPOTTER_ NAGINI
【Unity,C#】哨兵射线触发器模板代码
【硬核拆解】50块2个的2022年夏季款智能节电器到底能不能省电?
MUI as a mobile phone to return to the action bar
C#的DataTable帮助类
canvas粒子雨动画js特效
Go 单元测试
二分练习题
ODrive开发 #1 ODrive固件开发指南[通俗易懂]
【黑马早报】胡军代言悟空理财涉嫌欺诈,疑似涉及390亿元;涪陵榨菜回应榨菜吃出脚指甲; 鸿星尔克再捐1个亿;腾讯控股股价跌回5年前...
泰国 好产品推荐!2022年最好的胶原蛋白评测有哪些? 喝出健康和美丽适合需要改善肌肤
MySQL加锁案例分析
14年测试人最近的面试经历,值得借鉴√
MySQL INTERVAL Keyword Guidelines
mysql 面试题
【Unity,C#】哨兵点位循迹模板代码
OneFlow源码解析:Op、Kernel与解释器
Financial products with high annualized returns
Can MySQL do two-way synchronization of multiple vps?