redis clusters and build Sentinel mode AOF and RDB and persistence

Sentinel + Redis master-slave mode
1, the environment to prepare
(1) three separate linux host
(2) are the IP: 10.150.200.182 (from) 10.150.200.184 (from) 10.150.200.195 (master)
2, Redis installation
(1 ) are mounted on each host redis to 10.150.200.182 an example, the following steps:
① download redis stable release, such as: 4.0.8
http://download.redis.io/releases/redis-4.0.8.tar. GZ
② uploading and downloading Redis tar packets to / usr / local directory under
Rz -be
③ tar packets decompressed in the current directory
tar-4.0.8.tar.gz -zxvf Redis
④ Redis-4.0.8 directory after entering decompression
cd redis -4.0.8
⑤ compile
the make
⑥ installation
the make install
⑦ new data, logs directory (to store data and log files)
mkdir the data logs
after ⑧ move the startup script extract the redis-4.0.8 directory (the default installation startup script in the current directory the src folder)
cd src
mv-cli Redis Redis Redis-Server-Sentinel /usr/local/redis-4.0.8
⑨ exit to the installation directory
cd ..

(2) redis.conf master-slave configuration, sentinel.conf arranged Sentinel
conf which a lot of the initial configuration items can not be modified, the need for new or modified configuration items, as follows:
General configuration
The following three configurations each sure redis.conf which modify, add in each sentinel.conf years.
bind 10.150.200.182 (native server ip address)
to daemonize Yes (backgrounding support)
logfile / usr / local / Redis-4.0.8 / logs / xxx.log
slave configuration
specified in redis.conf 2 th master the slave
slaveof 10.150 6000 .200.195
Sentinel configured
in three sentinel.conf designated to monitor Master
Sentinel monitor mymaster 10.150.200.195 6000 2 (designated monitoring master, the last one represents a quorum, that is recognized master 'objective offline' lowest number of votes established)

3, master-slave, Sentinel operation
start Redis (three are required to start, to verify the backup data from the master, and then start sentinel) (. 1)
./redis-server the conf-Redis
(2) Start Sentinel
./redis-sentinel sentinel. conf
(3) slightly ...
4, slightly ...

Reference documents: https://www.cnblogs.com/itdragon/p/7906481.html

Guess you like

Origin www.cnblogs.com/duende99/p/11128686.html