`
happyqing
  • 浏览: 3198083 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

linux下redis主从配置,哨兵配置,自动切换

阅读更多

redis-3.2.6

 

linux下安装redis 启动,停止,连接 编辑  删除

http://happyqing.iteye.com/blog/2348255

 

linux安装redis主备安装配置

http://happyqing.iteye.com/blog/2353516

 

建议最少配3个哨兵,

如果只有两台服务器,(一个服务器也可装多个redis,端口不同)

主redis服务器,1个哨兵 (防火墙需要开通6379,26379端口)

从redis服务器,2个哨兵(防火墙需要开通6380,26380,26381端口)

 

java端配置连接池,连接多个哨兵

http://blog.csdn.net/csolo/article/details/53196293

jedis-2.2.1可以这样使用

sentinels.add("192.168.2.11:26379");

sentinels.add("192.168.2.11:26380");

sentinels.add("192.168.2.11:26381");

 

也可以在一台机器上测试

 

sentinel26379.conf

#保护模式
protected-mode no

#端口
port 26379

#守护进程
#daemonize yes

#设置pid文件路径
pidfile /opt/redis/sentinel_26379.pid
	
#工作路径,不用改
dir /tmp
	
#设置日志文件路径
#logfile /opt/redis/logs/sentinel26379.log

# 哨兵监控这个master,在至少quorum个哨兵实例都认为master down后把master标记为odown
# (objective down客观down;相对应的存在sdown,subjective down,主观down)状态。
# slaves是自动发现,不用指定slaves。
se

 

sentinel26380.conf

#保护模式
protected-mode no

#端口
port 26380

#守护进程
#daemonize yes

#设置pid文件路径
pidfile /opt/redis/sentinel_26380.pid
	
#工作路径,不用改
dir /tmp
	
#设置日志文件路径
#logfile /opt/redis/logs/sentinel26380.log

# 哨兵监控这个master,在至少quorum个哨兵实例都认为master down后把master标记为odown
# (objective down客观down;相对应的存在sdown,subjective down,主观down)状态。
# slaves是自动发现,不用指定slaves。
sentinel monitor mymaster 192.168.2.11 6379 2

# master或slave多长时间(默认30秒)不能使用后标记为s_down状态。
sentinel down-after-milliseconds mymaster 30000

#选项指定了在执行故障转移时, 最多可以有多少个从服务器同时对新的主服务器进行同步, 这个数字越小, 完成故障转移所需的时间就越长。
sentinel parallel-syncs mymaster 1

#若sentinel在该配置值内未能完成failover操作(即故障时master/slave自动切换),则认为本次failover失败。
sentinel failover-timeout mymaster 180000

#设置master和slaves的密码
sentinel auth-pass mymaster redis2016

 

sentinel26381.conf

#保护模式
protected-mode no

#端口
port 26381

#守护进程
#daemonize yes

#设置pid文件路径
pidfile /opt/redis/sentinel_26381.pid
	
#工作路径,不用改
dir /tmp
	
#设置日志文件路径
#logfile /opt/redis/logs/sentinel26381.log

# 哨兵监控这个master,在至少quorum个哨兵实例都认为master down后把master标记为odown
# (objective down客观down;相对应的存在sdown,subjective down,主观down)状态。
# slaves是自动发现,不用指定slaves。
sentinel monitor mymaster 192.168.2.11 6379 2

# master或slave多长时间(默认30秒)不能使用后标记为s_down状态。
sentinel down-after-milliseconds mymaster 30000

#选项指定了在执行故障转移时, 最多可以有多少个从服务器同时对新的主服务器进行同步, 这个数字越小, 完成故障转移所需的时间就越长。
sentinel parallel-syncs mymaster 1

#若sentinel在该配置值内未能完成failover操作(即故障时master/slave自动切换),则认为本次failover失败。
sentinel failover-timeout mymaster 180000

#设置master和slaves的密码
sentinel auth-pass mymaster redis2016

 

sentinel monitor mymaster 192.168.2.11 6379 2

这个要配局域网IP,否则远程连不上,

最后的quorum最好配成2,不要配成1,否则容易切换失败

 

测试时可以把

sentinel down-after-milliseconds mymaster 30000 参数设短点,减少等待时间

daemonize no

logfile ""

这样方便看日志,好停止

 

启动

/opt/redis/bin/redis-sentinel /opt/redis/conf/sentinel26379.conf

/opt/redis/bin/redis-sentinel /opt/redis/conf/sentinel26380.conf

/opt/redis/bin/redis-sentinel /opt/redis/conf/sentinel26381.conf

 

连接

/opt/redis/bin/redis-cli -h 192.168.2.11 -p 26379 -a redis2016

 

停止

/opt/redis/bin/redis-cli -h 192.168.2.11 -p 26379 -a redis2016 shutdown

 

模拟

结束redis,sentinel26379进程

查看reids6380日志

查看sentinel26380,sentinel26381日志

可查看主从切换过程

 

结束进程

[root@dev ~]# ps -ef|grep redis

root     23703  1012  0 17:49 pts/1    00:00:00 /opt/redis/bin/redis-server *:6379                    

root     23706  2392  0 17:49 pts/5    00:00:00 /opt/redis/bin/redis-server *:6380                        

root     23723  2437  1 17:49 pts/6    00:00:00 /opt/redis/bin/redis-sentinel *:26379 [sentinel]                

root     23726 14438  1 17:49 pts/10   00:00:00 /opt/redis/bin/redis-sentinel *:26380 [sentinel]                

root     23743  2493  1 17:49 pts/8    00:00:00 /opt/redis/bin/redis-sentinel *:26381 [sentinel]                

root     23753 15605  0 17:50 pts/9    00:00:00 grep redis

[root@dev ~]# kill -9 23703 23723

 

1.主redis日志

23703:M 17 Jan 17:49:27.318 # Server started, Redis version 3.2.6

23703:M 17 Jan 17:49:27.319 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

23703:M 17 Jan 17:49:27.320 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

23703:M 17 Jan 17:49:27.320 * DB loaded from disk: 0.000 seconds

23703:M 17 Jan 17:49:27.320 * The server is now ready to accept connections on port 6379

23703:M 17 Jan 17:49:30.262 * Slave 192.168.2.11:6380 asks for synchronization

23703:M 17 Jan 17:49:30.263 * Full resync requested by slave 192.168.2.11:6380

23703:M 17 Jan 17:49:30.263 * Starting BGSAVE for SYNC with target: disk

23703:M 17 Jan 17:49:30.275 * Background saving started by pid 23709

23709:C 17 Jan 17:49:30.343 * DB saved on disk

23709:C 17 Jan 17:49:30.345 * RDB: 6 MB of memory used by copy-on-write

23703:M 17 Jan 17:49:30.349 * Background saving terminated with success

23703:M 17 Jan 17:49:30.350 * Synchronization with slave 192.168.2.11:6380 succeeded

 

 

已杀死

 

2.从redis6380日志

23706:S 17 Jan 17:49:30.257 # Server started, Redis version 3.2.6

23706:S 17 Jan 17:49:30.258 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

23706:S 17 Jan 17:49:30.258 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

23706:S 17 Jan 17:49:30.258 * DB loaded from disk: 0.001 seconds

23706:S 17 Jan 17:49:30.258 * The server is now ready to accept connections on port 6380

23706:S 17 Jan 17:49:30.259 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:49:30.259 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:49:30.260 * Non blocking connect for SYNC fired the event.

23706:S 17 Jan 17:49:30.260 * Master replied to PING, replication can continue...

23706:S 17 Jan 17:49:30.262 * Partial resynchronization not possible (no cached master)

23706:S 17 Jan 17:49:30.288 * Full resync from master: f43a3a2b02420a869d003c5394e07ee2ec145f84:1

23706:S 17 Jan 17:49:30.350 * MASTER <-> SLAVE sync: receiving 168 bytes from master

23706:S 17 Jan 17:49:30.350 * MASTER <-> SLAVE sync: Flushing old data

23706:S 17 Jan 17:49:30.350 * MASTER <-> SLAVE sync: Loading DB in memory

23706:S 17 Jan 17:49:30.351 * MASTER <-> SLAVE sync: Finished with success

 

23706:S 17 Jan 17:50:52.645 # Connection with master lost.

23706:S 17 Jan 17:50:52.646 * Caching the disconnected master state.

23706:S 17 Jan 17:50:52.837 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:50:52.837 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:50:52.838 # Error condition on socket for SYNC: Connection refused

23706:S 17 Jan 17:50:53.848 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:50:53.849 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:50:53.849 # Error condition on socket for SYNC: Connection refused

23706:S 17 Jan 17:50:54.879 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:50:54.880 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:50:54.880 # Error condition on socket for SYNC: Connection refused

23706:S 17 Jan 17:50:55.891 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:50:55.891 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:50:55.892 # Error condition on socket for SYNC: Connection refused

23706:S 17 Jan 17:50:56.898 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:50:56.898 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:50:56.899 # Error condition on socket for SYNC: Connection refused

23706:S 17 Jan 17:50:57.906 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:50:57.907 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:50:57.907 # Error condition on socket for SYNC: Connection refused

23706:S 17 Jan 17:50:58.917 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:50:58.918 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:50:58.918 # Error condition on socket for SYNC: Connection refused

23706:S 17 Jan 17:50:59.927 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:50:59.932 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:50:59.932 # Error condition on socket for SYNC: Connection refused

23706:S 17 Jan 17:51:00.940 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:51:00.941 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:51:00.941 # Error condition on socket for SYNC: Connection refused

23706:S 17 Jan 17:51:01.949 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:51:01.950 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:51:01.950 # Error condition on socket for SYNC: Connection refused

23706:S 17 Jan 17:51:02.959 * Connecting to MASTER 192.168.2.11:6379

23706:S 17 Jan 17:51:02.960 * MASTER <-> SLAVE sync started

23706:S 17 Jan 17:51:02.960 # Error condition on socket for SYNC: Connection refused

23706:M 17 Jan 17:51:03.125 * Discarding previously cached master state.

23706:M 17 Jan 17:51:03.125 * MASTER MODE enabled (user request from 'id=5 addr=192.168.2.11:52242 fd=9 name=sentinel-8a2828fe-cmd age=70 idle=0 flags=x db=0 sub=0 psub=0 multi=3 qbuf=0 qbuf-free=32768 obl=36 oll=0 omem=0 events=r cmd=exec')

 

23706:M 17 Jan 17:51:03.131 # CONFIG REWRITE executed with success.

 

3.sentinel26379日志

23723:X 17 Jan 17:49:44.032 # Sentinel ID is 87db9542e66f3da13a24426ec16f971e683ab33c

23723:X 17 Jan 17:49:44.033 # +monitor master mymaster 192.168.2.11 6379 quorum 2

23723:X 17 Jan 17:49:44.036 * +slave slave 192.168.2.11:6380 192.168.2.11 6380 @ mymaster 192.168.2.11 6379

 

23723:X 17 Jan 17:49:55.791 * +sentinel sentinel 8a2828fe4def373111d21ef4fefecb60ebaca83e 192.168.2.11 26380 @ mymaster 192.168.2.11 6379

23723:X 17 Jan 17:50:00.623 * +sentinel sentinel 18c682862d62ebe411ad11a99daa4758464a8d04 192.168.2.11 26381 @ mymaster 192.168.2.11 6379

 

已杀死

 

4.sentinel26380日志

23726:X 17 Jan 17:49:53.837 # Sentinel ID is 8a2828fe4def373111d21ef4fefecb60ebaca83e

23726:X 17 Jan 17:49:53.838 # +monitor master mymaster 192.168.2.11 6379 quorum 2

23726:X 17 Jan 17:49:53.841 * +slave slave 192.168.2.11:6380 192.168.2.11 6380 @ mymaster 192.168.2.11 6379

23726:X 17 Jan 17:49:54.222 * +sentinel sentinel 87db9542e66f3da13a24426ec16f971e683ab33c 192.168.2.11 26379 @ mymaster 192.168.2.11 6379

23726:X 17 Jan 17:50:00.623 * +sentinel sentinel 18c682862d62ebe411ad11a99daa4758464a8d04 192.168.2.11 26381 @ mymaster 192.168.2.11 6379

 

23726:X 17 Jan 17:51:02.748 # +sdown master mymaster 192.168.2.11 6379

23726:X 17 Jan 17:51:02.748 # +sdown sentinel 87db9542e66f3da13a24426ec16f971e683ab33c 192.168.2.11 26379 @ mymaster 192.168.2.11 6379

23726:X 17 Jan 17:51:02.820 # +odown master mymaster 192.168.2.11 6379 #quorum 2/2

23726:X 17 Jan 17:51:02.820 # +new-epoch 1

23726:X 17 Jan 17:51:02.820 # +try-failover master mymaster 192.168.2.11 6379

23726:X 17 Jan 17:51:02.868 # +vote-for-leader 8a2828fe4def373111d21ef4fefecb60ebaca83e 1

23726:X 17 Jan 17:51:02.908 # 18c682862d62ebe411ad11a99daa4758464a8d04 voted for 8a2828fe4def373111d21ef4fefecb60ebaca83e 1

23726:X 17 Jan 17:51:02.960 # +elected-leader master mymaster 192.168.2.11 6379

23726:X 17 Jan 17:51:02.960 # +failover-state-select-slave master mymaster 192.168.2.11 6379

23726:X 17 Jan 17:51:03.061 # +selected-slave slave 192.168.2.11:6380 192.168.2.11 6380 @ mymaster 192.168.2.11 6379

23726:X 17 Jan 17:51:03.062 * +failover-state-send-slaveof-noone slave 192.168.2.11:6380 192.168.2.11 6380 @ mymaster 192.168.2.11 6379

23726:X 17 Jan 17:51:03.124 * +failover-state-wait-promotion slave 192.168.2.11:6380 192.168.2.11 6380 @ mymaster 192.168.2.11 6379

23726:X 17 Jan 17:51:03.302 # +promoted-slave slave 192.168.2.11:6380 192.168.2.11 6380 @ mymaster 192.168.2.11 6379

23726:X 17 Jan 17:51:03.302 # +failover-state-reconf-slaves master mymaster 192.168.2.11 6379

23726:X 17 Jan 17:51:03.331 # +failover-end master mymaster 192.168.2.11 6379

23726:X 17 Jan 17:51:03.331 # +switch-master mymaster 192.168.2.11 6379 192.168.2.11 6380

23726:X 17 Jan 17:51:03.332 * +slave slave 192.168.2.11:6379 192.168.2.11 6379 @ mymaster 192.168.2.11 6380

23726:X 17 Jan 17:51:13.372 # +sdown slave 192.168.2.11:6379 192.168.2.11 6379 @ mymaster 192.168.2.11 6380

 

5.sentinel26381日志

23743:X 17 Jan 17:49:58.700 # Sentinel ID is 18c682862d62ebe411ad11a99daa4758464a8d04

23743:X 17 Jan 17:49:58.701 # +monitor master mymaster 192.168.2.11 6379 quorum 2

23743:X 17 Jan 17:49:58.704 * +slave slave 192.168.2.11:6380 192.168.2.11 6380 @ mymaster 192.168.2.11 6379

23743:X 17 Jan 17:49:59.885 * +sentinel sentinel 8a2828fe4def373111d21ef4fefecb60ebaca83e 192.168.2.11 26380 @ mymaster 192.168.2.11 6379

23743:X 17 Jan 17:50:00.305 * +sentinel sentinel 87db9542e66f3da13a24426ec16f971e683ab33c 192.168.2.11 26379 @ mymaster 192.168.2.11 6379

 

23743:X 17 Jan 17:51:02.692 # +sdown master mymaster 192.168.2.11 6379

23743:X 17 Jan 17:51:02.692 # +sdown sentinel 87db9542e66f3da13a24426ec16f971e683ab33c 192.168.2.11 26379 @ mymaster 192.168.2.11 6379

23743:X 17 Jan 17:51:02.885 # +new-epoch 1

23743:X 17 Jan 17:51:02.907 # +vote-for-leader 8a2828fe4def373111d21ef4fefecb60ebaca83e 1

23743:X 17 Jan 17:51:03.360 # +config-update-from sentinel 8a2828fe4def373111d21ef4fefecb60ebaca83e 192.168.2.11 26380 @ mymaster 192.168.2.11 6379

23743:X 17 Jan 17:51:03.360 # +switch-master mymaster 192.168.2.11 6379 192.168.2.11 6380

23743:X 17 Jan 17:51:03.361 * +slave slave 192.168.2.11:6379 192.168.2.11 6379 @ mymaster 192.168.2.11 6380

23743:X 17 Jan 17:51:13.396 # +sdown slave 192.168.2.11:6379 192.168.2.11 6379 @ mymaster 192.168.2.11 6380

 

主备切换等操作,redis会修改配置文件

 

分享到:
评论

相关推荐

    Redis哨兵主从模式+keepalived.docx

    Redis哨兵主从模式是指 Redis 的一种高可用性解决方案,通过哨兵模式实现自动故障切换和虚拟IP漂移,以提供高可用性的Redis服务。下面是相关知识点的详细解释: 一、Redis主从复制模式 Redis主从复制模式是一种...

    redis主从配置以及哨兵模式配置

    ### Redis 主从配置及哨兵模式详解 #### 一、实验环境 - **Redis 版本**: Redis 4.0.6 - **操作系统**: Linux (安装于虚拟机中) - **宿主主机**: Windows 10 x64 - **远程终端工具**: Xshell 5 #### 二、主从...

    redis linux安装主从自动切换配置

    以上就是Redis在Linux环境下的安装、主从复制配置以及自动故障切换的详细过程。请根据实际情况调整配置文件中的参数,确保系统安全稳定运行。在实际应用中,还应考虑备份策略、安全性设置以及性能优化等细节。

    redis单节点+主从+哨兵模式(高可用)搭建-1125.docx

    【Redis 单节点模式】 Redis 是一款开源的高...总的来说,Redis 的单节点、主从模式和哨兵模式分别提供了基础服务、数据冗余和高可用性。通过灵活地组合这些模式,可以根据实际需求构建出适合业务场景的 Redis 集群。

    redis主从服务搭建demo

    首先,我们需要理解Redis主从架构的核心概念。在主从模式下,一个Redis实例作为主节点负责数据的读写操作,而其他实例作为从节点,实时同步主节点的数据,确保在主节点出现故障时,可以从节点接管服务,避免数据丢失...

    redis主从集群搭建及容灾部署(哨兵sentinel).pdf

    在 Linux 环境下,通常使用源码编译的方式安装 Redis。例如,在 CentOS 6.6 64bit 上,首先需要确保系统满足最低硬件需求,如 CPU 和内存。下载 Redis 的源码包,如 3.0.0 版本,然后解压、编译并安装。通过 `make`...

    windows环境下redis高可用之主从复制与哨兵监控.

    ### Windows环境下Redis高可用之主从复制与哨兵监控 #### 一、概述 随着分布式系统和微服务架构的普及,高性能、高可用性的数据库成为众多应用的基础需求之一。Redis作为一款广泛使用的开源键值存储系统,凭借其...

    linux版redis配置文件及redis安装包.zip

    例如,使用哨兵(Sentinel)系统实现主从自动切换,或者使用Cluster实现分布式存储。同时,合理设置内存和磁盘策略,确保Redis在面临高并发和大数据量时依然能够高效稳定地运行。 总之,这个资源包为Linux环境下的...

    Linux下Redis的安装和部署(三)--哨兵模式的部署.pdf

    在Linux环境下部署Redis时,哨兵(Sentinel)模式是一种高可用性的解决方案,它能够监控Redis主从集群的状态,自动进行故障检测、故障恢复以及配置更新。以下是对哨兵模式部署的详细解释: 1. **哨兵模式配置文件**...

    Redis哨兵主从模式+keepalived

    Redis哨兵主从模式与Keepalived的组合是构建高可用、高可靠分布式系统的关键技术之一,尤其在Java开发环境中广泛使用。以下是对这一主题的详细解析。 **Redis哨兵(Sentinel)主从模式** Redis Sentinel是Redis提供...

    redis集群搭建.txt

    redis集群部署+哨兵模式配置 配置redis主从复制,配置哨兵模式,实现主从自动切换 1、准备至少三台Linux服务器并关闭防火墙 2、安装软件包 3、下载redis源码包并安装

    最新版linux redis-5.0.11.tar.gz

    8. **哨兵系统(Sentinel)**:Redis Sentinel是高可用性解决方案,用于监控、故障检测和自动故障切换,确保服务的连续性。 9. **集群搭建**:Redis Cluster支持数据分区和分布式存储,适合处理大规模数据。 10. *...

    2.redis运维实战教程资料-详细课件笔记总结

    12.redis的哨兵模式实现主从自动切换,保障主从高可用 13.redis cluster集群搭建,实现分布式数据存储及高可用的主从故障切换 14.redis cluster集群增加节点和删除节点 本课程笔记注意: 本课程笔记,笔记文档和...

    redis在linux下的单机安装和多实例安装.rar--附带视频版本

    2. **哨兵模式**: Redis Sentinel提供高可用性解决方案,监控、故障检测和自动故障切换。需要至少三个Sentinel实例,配置文件中启用`sentinel`模块。 3. **持久化策略**: Redis支持RDB和AOF两种持久化方式,可以...

    Linux运维数据库篇redis三种高可用方式部署 数据库运维.pdf

    哨兵模式可以实现自动故障切换和负载均衡,它可以监控 Redis 节点的状态,并自动将从节点提升为主节点,以确保数据的高可用性。 集群模式 集群模式是 Redis 的一种高可用方式,它可以将多个 Redis 节点组成一个...

    redis-linux(服务端、客户端)

    哨兵系统则进一步提供了高可用性解决方案,能自动检测并切换主节点;而Redis Cluster则通过分片技术实现大规模数据存储和处理。 在实际应用中,我们还应注意性能优化。例如,合理设置Redis的内存上限、定期执行`...

    最新版linux redis-6.0.1.tar.gz

    3. 源码安装:Linux环境下,解压tar.gz文件通常使用`tar -zxvf redis-6.0.1.tar.gz`命令,然后进入解压后的目录,通过`./configure`进行配置,`make`编译,最后`make install`安装到系统路径。 4. 配置文件:Redis...

    黑马(linux、redis、oracle、maven、全栈基础班视频教程

    3. **高级特性**:学习Redis提供的持久化机制(RDB和AOF)、主从复制、哨兵模式等高级特性。 4. **性能优化**:了解如何通过参数调整等方式提高Redis的性能表现。 ### Oracle数据库 Oracle是一种关系型数据库管理...

    redis安装包运行环境

    主从复制可以实现数据的冗余备份,哨兵系统则可以监控并自动故障切换,确保服务的持续性。 总的来说,安装和配置Redis运行环境涉及多个层面,包括操作系统兼容性、服务启动与管理、安全配置以及性能优化。理解这些...

    Redis非关系型数据库笔记-数据持久化-主从同步-缓存-笔记-五大数据类型-三大特殊数据类型

    #### 四、Redis主从同步 - **复制机制**: Redis支持主从复制,主节点负责写操作,从节点读取主节点的数据,并可以处理读操作。 - **优点**: - 提升读性能: 读操作可以分发到从节点,减少主节点压力。 - 数据冗余:...

Global site tag (gtag.js) - Google Analytics