[27858] 12 Mar 15:45:46.995 # Server started, Redis version 2.8.19
[27858] 12 Mar 15:45:46.995 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[27858] 12 Mar 15:45:46.995 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
[27858] 12 Mar 15:45:46.995 * The server is now ready to accept connections on port 6379
[27858] 12 Mar 15:45:47.994 * Connecting to MASTER 192.168.56.101:6379
[27858] 12 Mar 15:45:47.995 * MASTER SLAVE sync started
[27858] 12 Mar 15:45:47.998 * Non blocking connect for SYNC fired the event.
[27858] 12 Mar 15:45:47.998 * Master replied to PING, replication can continue...
[27858] 12 Mar 15:45:48.000 * Partial resynchronization not possible (no cached master)
[27858] 12 Mar 15:45:48.003 * Full resync from master: 61bd7da80aa956fb7c396169b6650b45efa25d45:1
[27858] 12 Mar 15:45:48.041 * MASTER SLAVE sync: receiving 32 bytes from master
[27858] 12 Mar 15:45:48.042 * MASTER SLAVE sync: Flushing old data
[27858] 12 Mar 15:45:48.042 * MASTER SLAVE sync: Loading DB in memory
[27858] 12 Mar 15:45:48.042 * MASTER SLAVE sync: Finished with success
4.验证
主库上操作
[iyunv@node1 src]# ./redis-cli
127.0.0.1:6379> set yourname test
OK
127.0.0.1:6379>
从库上操作
[iyunv@node2 src]# ./redis-cli
127.0.0.1:6379> get yourname
"test"
127.0.0.1:6379>