从库配置:

从库内网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"

主库配置:

主库内网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"