Redis群集和哨兵模式

奋斗吧
奋斗吧
擅长邻域:未填写

标签: Redis群集和哨兵模式 博客 51CTO博客

2023-07-26 18:24:24 85浏览

Redis群集和哨兵模式,推荐步骤:1.在centos01到centos04配置hosts文件并安装redis服务器2.配置主从复制群集,在centos01配置主redis节点,centos02和centos03配置redis群集节点,验证主从复制3.在centos04安装redis配置哨兵模式,监控主节点状态,模拟故障切换实验步骤:配置hosts配置文件将hosts文件发送给centos02到centos04解压移动Re

推荐步骤:

1.在centos01到centos04配置hosts文件并安装redis服务器

2.配置主从复制群集,在centos01配置主redis节点,centos02和centos03配置redis群集节点,验证主从复制

3.在centos04安装redis配置哨兵模式,监控主节点状态,模拟故障切换

实验步骤:

配置hosts配置文件

Redis群集和哨兵模式_centos

将hosts文件发送给centos02到centos04

Redis群集和哨兵模式_centos_02

解压移动Redis安装位置配置安装redis服务器

Redis群集和哨兵模式_redis_03

初始化redis服务器

Redis群集和哨兵模式_redis_04

停止redis服务

Redis群集和哨兵模式_配置文件_05

修改redis主配置文件

Redis群集和哨兵模式_配置文件_06

Redis群集和哨兵模式_centos_07

Redis群集和哨兵模式_centos_08

Redis群集和哨兵模式_centos_09

Redis群集和哨兵模式_配置文件_10

将主配置文件发送到centos02到centos04

Redis群集和哨兵模式_redis_11

启动服务查看服务状态

其他三台虚拟机的安装方式同上

Redis群集和哨兵模式_配置文件_12

修改主配置文件监听的IP地址

Redis群集和哨兵模式_centos_13

启动服务查看服务状态

Redis群集和哨兵模式_配置文件_14

修改主配置文件监听的IP地址

Redis群集和哨兵模式_配置文件_15

启动服务查看运行状态

Redis群集和哨兵模式_centos_16

将第一台从节点加入到群集中

Redis群集和哨兵模式_redis_17

将第二台节点加入到群集中

Redis群集和哨兵模式_配置文件_18

查看复制群集状态

Redis群集和哨兵模式_redis_19

启动哨兵服务模式

Redis群集和哨兵模式_redis_20

Redis群集和哨兵模式_centos_21

Redis群集和哨兵模式_redis_22

停止主redis服务

Redis群集和哨兵模式_redis_23

查看redis-sentinel监控

Redis群集和哨兵模式_redis_24

登录新的主节点

Redis群集和哨兵模式_centos_25

启动故障节点

Redis群集和哨兵模式_centos_26

查看主从信息

Redis群集和哨兵模式_centos_27

好博客就要一起分享哦!分享海报

此处可发布评论

评论(0展开评论

暂无评论,快来写一下吧

展开评论

您可能感兴趣的博客

客服QQ 1913284695