redis-master:192.168.199.223

redis-slave_1: 192.168.199.224

redis-slave_2: 192.168.199.252

redis-master配置文件
[root@test ~]# cat /opt/redis/redis.conf |grep -Ev '^$|^#'
bind 0.0.0.0
protected-mode no
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize yes
supervised no
pidfile /var/run/redis_6379.pid
loglevel notice
logfile ""
databases 16
always-show-logo yes
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir ./
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
requirepass jason_zhang
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
slave-lazy-flush no
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble no
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes
redis-slave配置文件
[root@jason opt]# cat /opt/redis/redis.conf|grep -Ev '^$|^#'
bind 0.0.0.0
protected-mode no
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize yes
supervised no
pidfile /var/run/redis_6379.pid
loglevel notice
logfile ""
databases 16
always-show-logo yes
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir ./
slaveof 192.168.199.223 6379
masterauth jason_zhang
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
requirepass jason_zhang
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
slave-lazy-flush no
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble no
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes
sentinel 配置(所有的都一样)
protected-mode no
daemonize yes
port 26379
dir /tmp
logfile "/usr/local/bin/sentinel.log"
sentinel monitor mymaster 192.168.199.223 6379 1
sentinel auth-pass mymaster jason_zhang
sentinel down-after-milliseconds mymaster 30
sentinel parallel-syncs mymaster 1
sentinel failover-timeout mymaster 30
sentinel deny-scripts-reconfig yes

运行redis和sentinel(master-slave-sentinel)

  

  

  

centos 7 redis-4.0.11 哨兵的更多相关文章

  1. 配置redis 4.0.11 集群

    配置redis 4.0.11 集群 准备redis 软件和redis配置文件 启动Redis服务 /data/soft/redis/src/redis-check-aof --fix /log/red ...

  2. redis(4.0.11)编译安装

    一: redis数据库安装 系统环境:linux系统(centos/redhat):Red Hat Enterprise Linux Server release 6.8 (Santiago) red ...

  3. centos安装redis 5.0版本的集群

    我在本地VM-Centos里安装5.0.5时安装遇到了些问题,参考了Blog:https://www.cnblogs.com/shawhe/p/9548620.html 顺利安装完成. 安装redis ...

  4. centos7用docker安装单节点redis4.0.11

    [root@localhost conf]# docker search redisINDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATEDdocker.io d ...

  5. redis-4.0.11主从配置初步探究

    redis-4.0.11相较于以前版本,新增了几个安全措施,稍稍研究了6379.conf配置文件,在这里记录一下. 实验环境: centos7.4 redis:redis-4.0.11 1. redi ...

  6. Redis-4.0.11集群配置

    版本:redis-3.0.5 redis-3.2.0  redis-3.2.9  redis-4.0.11 参考:http://redis.io/topics/cluster-tutorial. 集群 ...

  7. CENTOS7下安装REDIS4.0.11

    拷贝收藏私用,别无他意,原博客地址: https://www.cnblogs.com/zuidongfeng/p/8032505.html 1.安装redis 第一步:下载redis安装包 wget ...

  8. centos / Linux 服务环境下安装 Redis 5.0.3

    原文:centos / Linux 服务环境下安装 Redis 5.0.3 1.首先进入你要安装的目录 cd /usr/local 2.下载目前最新稳定版本 Redis 5.0.3 wget http ...

  9. CentOS 7.2.1511编译安装Nginx1.10.1+MySQL5.7.14+PHP7.0.11

    准备篇 一.防火墙配置 CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.se ...

随机推荐

  1. Maven项目指定JDK版本

    <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> ...

  2. Java快速开发平台强大的代码生成器,JEECG 3.7.5 VUE+ElementUI SPA单页面应用版本发布

    JEECG 3.7.5 VUE+ElementUI SPA单页面应用版本发布 此版本为Vue+ElementUI SPA单页面应用版本,提供新一代风格代码生成器模板,采用Vue技术,提供两套精美模板E ...

  3. svn分支

    在svn上我们除过一般的保存文档外,对于开发source,可以使用 trunk(主线),branch(分线), tag(上线或测试用) 做分支应用开发. trunk上建立代码位置,存放代码. 点击Te ...

  4. 1047A_Little C Loves 3 I(构造)

    A. Little C Loves 3 I time limit per test 1 second memory limit per test 256 megabytes input standar ...

  5. Java中Asm包有什么用?

    ASM能做什么 我们都知道,一般情况下,Class文件是通过javac编译器产生的,然后通过类加载器加载到虚拟机内,再通过执行引擎去执行. 现在我们可以通过ASM的API直接生成符合Java虚拟机规范 ...

  6. 【388】※ Some useful websites for learning Python

    Ref: Python Tips 1. *args and **kwargs 2. Debugging 3. Generators 4. Map, Filter and Reduce 5. set D ...

  7. 2.Servlet基础.md

    目录 1.定义 2.特点 3.手动编写一个Servlet 3.1创建一个Servlet类 3.2找到编写类的class文件,将这个类的整个包拷贝到一个web应用中的WEB-INF/classes目录下 ...

  8. JAVAWEB 一一 框架整合(SSH,Spring+Struts2+Hibernate IOC/DI AOP声明式事务处理 定时任务)

    package org.springframework.orm.hibernate3; import java.io.Serializable; import java.util.List; impo ...

  9. CentOS添加环境变量

    添加这个两个路径:/usr/local/webserver/python/bin:/usr/local/webserver/mysql/bin 方法一:直接运行命令export PATH=$PATH: ...

  10. python基础学习Day12 生成器、列表推导式、字典的表达式、字典键值对的互换、集合推导式

    一.生成器 1.1 生成器:就是(python)自己用代码写的迭代器,生成器的本质就是迭代器. 1.2 生成器函数 def func1(x): x += print() yield x print() ...