主服务器:192.168.0.110
从服务器:192.168.0.120
在120服务器的redis.conf 文件中加入 slaveof 192.168.0.110 6379
如果主服务器有密码,还需要配置密码:masterauth password
完成之后,重启redis服务搞定~