redis基于密码验证的主从复制配置

从库配置:

从库内网ip:192.168.1.9
[root@localhost ~]# grep -Ev “#|$” /usr/local/redis/etc/redis.conf|egrep “bind|tcp-backlog|daemonize|logfile|dir|slaveof|masterauth|requirepass|maxclients|maxmemory|appendonly|port”

bind 0.0.0.0
port 3089
tcp-backlog 1024
daemonize yes
logfile "/data/redis/log/10689redis.log"
dir /data/redis/data
slaveof 192.168.1.10 3089
masterauth Zyojdf
requirepass Zyojdf
maxclients 100000
maxmemory 3G
appendonly no
appendfilename "appendonly.aof"
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.

主库配置:

主库内网ip:192.168.1.10

[root@localhost ~]# grep -Ev “#|$” /usr/local/redis/etc/redis.conf|egrep “bind|tcp-backlog|daemonize|logfile|dir|slaveof|masterauth|requirepass|maxclients|maxmemory|appendonly|port”

bind 0.0.0.0
port 3089
tcp-backlog 1024
daemonize yes
logfile "/data/redis/log/10689redis.log"
dir /data/redis/data
requirepass Zyojdf
maxclients 100000
maxmemory 3G
appendonly no
appendfilename "appendonly.aof"
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
posted @ 2018-04-16 14:12  勤奋的蓝猫  阅读(1)  评论(0编辑  收藏  举报  来源