当前位置:网站首页>Redis cluster in Linux system
Redis cluster in Linux system
2022-06-11 08:21:00 【WldKid_ zxy】
Redis stay Linux Clusters in the system
1、 install Redis
Centos In the virtual machine installation tutorial
2. Modify the configuration file redis.conf
2.1 daemonize yes -- It is amended as follows yes Background start
2.2 protected-mode yes -- It is amended as follows protected-mode no
2.3 stay bind 127.0.0.1 Add #
2.4 requirepass 123456 -- Note set password
Get into redis Of bin start-up


3. colony
3.1 principle
The process :
1: When one starts from the database , Will send... To the main database sync command
2: The main database received sync After the command, the snapshot will be saved in the background ( perform rdb operation ), And cache the commands received during the save
3: When the snapshot is complete ,redis Will send the snapshot file and all cached commands to the slave database .
4: When received from the database , Will load the snapshot file and execute the received cached command .
3.2 Remote replication to another 2 Virtual machines
# Operate on the copier root@192.168.23.59-- Backup machine
scp -r /app/software/redis5 root@192.168.23.59:/app/software/
3.3 The host does not need to be configured , Configure slave redis.conf
3.3.1 slaveof host ip 6379
3.3.2 masterauth Host password
3.3 Sentinel mode configuration – edit redis-sentinel file 
- sentinel monitor mymast( name ) 192.168.110.133( host ip) 6379( port ) 1( Several agreed )
2.sentinel auth-pass mymast( name ) 123456( password )
3.sentinel down-after-milliseconds mymaster 30( The original value is 30000 30 millisecond )
4.sentinel parallel-syncs mymaster 2( Slave )
3.4 see
Start the host With two slaves Of redis service

3.5 Start the sentry from the machine
./redis-server /usr/local/redis/etc/sentinel.conf --sentinel &
3.6 Shut down the engine 
From machine to host 

边栏推荐
- JS basic learning script
- SylixOS SD设备驱动开发
- (resolved) the tqdm progress bar in the Jupiter notebook does not update and display in one line, but scrolls down to output
- Modulenotfounderror: no module named 'tensorboard in pytorch‘
- What does it mean to buy a single-mode, dual-mode and Rechargeable Wireless Mouse
- 字符设备驱动程序之异步通知机制
- torch. meshgrid
- E regression test of this featured app
- @Usage details of postconstruct, initializingbean and initmethod
- Return in foreach and break in for
猜你喜欢

记一次忽略@SuppressLint(“NewApi“)提示引发的血案

Return in foreach and break in for

Uniapp plug-in development

How to find the complementary sequence of digraph

Reference implementation scheme of database database and table division strategy

(the slow download speed of cifar10 in torchvision has been solved) how to download and use torchvision import

Typescript header file usage details

Figure seamless database integration tushare interface

Printing diamond of beginner C

Bubble sorting with C language
随机推荐
Printing diamond of beginner C
Modifying field length in Oracle and postgrepsql
Space geometry
Summary of embedded software interview questions
Method summary of creating deep learning model with keras/tensorflow 2.9
Shell Programming Notes
(resolved) typeerror: meshgrid() got an unexpected keyword argument 'indexing‘
134. gas station
Solve valueerror: no model found in config file
Typescript interface and type alias similarities and differences
bat 批处理单独环境打包
Anaconda+tensorflow most effective summary version (blood and tears summary of 6 reloads)
The difference between equals and = =
这几个小工具也太好用了
TypeScript-类型别名
Dameng database startup and shutdown
In an activity, view postdelay will cause memory leakage, but will not affect the life cycle execution of the activity.
Empty difference between postgrepsql and Oracle
Reference implementation scheme of database database and table division strategy
【 史上最全的ENSP【安装图解】!】