栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

云下redis sentinel哨兵模式部署

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

云下redis sentinel哨兵模式部署

  1. gcc --version确认gcc已经安装,如果没有则yum install gcc
  2. tar -zxvf 解压安装包后进入文件夹,执行make。如果报错,执行make distclean
  3. 执行make install。安装成功后如下
  4. redis.conf 修改内容
bind 0.0.0.0  
protected-mode no  
requirepass xxxxx   # 设置密码  
daemonize yes  
logfile "/home/rancher/redis/redis.log"  
appendonly no  
masterauth xxxx  # 密码  
replica-priority 100  # 越小越先选主节点 
  1. 启动 redis-server redis.conf
  2. 查看当前redis状态 redis-cli -p 6379,输入密码 auth xxxx,info replication
  3. 在从机上执行 slaveof $主机ip $主机port
  4. 设置哨兵。创建 sentinel.conf,内容为
sentinel monitor mymaster ${master的ip} 6379 1  
sentinel auth-pass mymaster xxxxx  
daemonize yes  
logfile "/home/rancher/redis-6.2.6/sentinel.log"  
sentinel announce-ip ${本机外网ip}  
  1. 启动哨兵 redis-sentinel sentinel.conf
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/868666.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号