linux redis 主从复制

时间:2023-02-03 21:15:33

在从服务的redis.conf 添加 slaveof 主服务器 端口

linux redis 主从复制

查看reids进程和端口,都是存在的。只是ip地址是127.0.0.1而不是0.0.0.0,只是本机能使用;

查找redis的配置文件redis.conf ; 编辑配置文件vim /usr/local/redis/etc/redis.conf
bind 127.0.0.1修改为bind 0.0.0.0

重启 redis