当前位置:网站首页>Redis of non relational database [detailed setup of redis cluster]
Redis of non relational database [detailed setup of redis cluster]
2022-07-28 07:56:00 【Eight pepper】
Here's the catalog title
Redis colony
1 redis-cluster Architecture diagram
2. redis Cluster building
2.1 install ruby
Cluster management tool (redis-trib.rb) It's using ruby Written in scripting language .
First step : install ruby
- [[email protected] bin]# yum install ruby
- [[email protected] bin]# yum install rubygems
The second step : Upload ruby and redis Interface file to linux System

The third step : Enter file directory , install ruby and redis Interface
- Because it is uploaded to the main directory of the file , So switch directories before installing

- install :[[email protected] ~]#
gem install redis-3.0.0.gem
Step four : take redis-3.0.0 It's a bag src Copy the following files in the directory to redis0707/redis-cluster/, And check whether the copy is successful

2.2 Set up the cluster
Write it at the front :
Set up the cluster , It's just ip and port The problem of . We want to build a cluster on a host for testing , Just modify the port , Make each redis The port number of the server is different .
Building a cluster requires at least 3 Console host , If each host is configured with another slave , At least 6 Taiwan machine .
The port design is as follows :7001-7006
- First step : Make a copy of 7001 machine

- The second step : If persistent files exist , Delete

- The third step : Set cluster parameters and modify ports :
- vim redis.conf
- Input /cluster Retrieve cluster parameters , hold no Change it to
yes, remember : Put the notes#Get rid of - After modifying the cluster parameters , Input /port Search port , Then change the port to 7001, And save exit .



- Step four : reproduce 7002-7006 machine

- Step five : Get into 7002-7006 The machines have their own
redis.conffile , Modify the port


- Step six : start-up 7001-7006 These six machines


- Step seven : modify startall.sh File permissions
reason : At present startall.sh Unenforceable- chmod u+x startall.sh

- Step eight : start-up

- Step nine : Create clusters
ip Address of virtual machine ip,1 It is to create a slave for each host , namely 3 Host computer 3 Slaves


3. Connect clusters
Enter one at random redis The server , Open the client .
- ./redis-cli -h 192.168.188.127 -p 7001 -c

4. Detection cluster

It can be seen that , The data is based on hash Calculation exists 7003 Number redis Server .
5. Shut down the cluster server
- Create a close script , Convenient for unified shutdown and startup in the future .


边栏推荐
- 任务管理器中,显示的CPU速度大于它的最大速度【主频】
- These mobile security browsers are more than a little easy to use
- 微信小程序隐藏滚动条的方法
- Rk3568 development board installation system startup
- Advanced pointer practice
- 常用电子产品行业标准及认证
- 演讲笔记 适合所有人的实用程序生成 PCG
- "Wei Lai Cup" 2022 Niuke summer multi school training camp 2 supplementary question record (dghjkl)
- ArcGIS JS自定义Accessor,并通过watchUtils相关方法watch属性
- DNA modified osmium OS nanoparticles osnps DNA modified iridium nanoparticles irnps DNA
猜你喜欢

Elaborate on common mode interference and differential mode interference

XMPP Service Research (II) prosody create account

EMC设计攻略 —时钟
![[solution] visual full link log tracking - log tracking system](/img/0c/f93c7d31e01257c5dee7d292ac7d84.jpg)
[solution] visual full link log tracking - log tracking system

谈谈DOM0,DOM1,DOM2,DOM3
C language explanation series - array explanation, one-dimensional array, two-dimensional array

演讲笔记 适合所有人的实用程序生成 PCG

DNA deoxyribonucleic acid modified platinum nanoparticles ptnps DNA | scientific research reagent

“蔚来杯“2022牛客暑期多校训练营2补题记录(DGHJKL)

Merge two sorted linked lists - two questions per day
随机推荐
Clion debugging redis6 source code
ASP. Net core technology insider and project practice after reading
[dry goods] 32 EMC standard circuits are shared!
Chapter 01 introduction of [notes of Huashu]
Google and Stanford jointly issued a document: why do we have to use large models?
【青鸟学员故事】追风少年“李晓亮”
聊一聊数据库的行存与列存
Mysql, how many columns can be used to create an index?
ArcGIS JS customizes the accessor and uses the watchutils related method to view the attribute
MySQL view the memory size of a table
解析树形结构 js
Summary of RFID radiation test
Swm32 series tutorial 5-adc application
Yaml parameter configuration based on singleton mode
Freezing and thawing of pytoch
干货|分享一个EMC实际案例及整改过程
Rk3568 development board installation system startup
[solution] visual full link log tracking - log tracking system
DNA脱氧核糖核酸修饰金属铂纳米颗粒PtNPS-DNA|科研试剂
Forward propagation of deep learning neural networks (1)