使用Redis命令行界面工具redis-cli来分别连接到Redis的主节点和从节点,以验证它们的运行状态和进行数据交互。
redis-cli -h 127.0.0.1 -p 6380
redis-cli -h 127.0.0.1 -p 6381