redis note

阅读更多
10.1.64.100

info replication

ps -ef|grep redis

./redis-server redis.conf

./redis-sentinel sentinel.conf &

./redis-cli shutdown

实例2
redis>
slaveof no one

实例1
redis>
slaveof 10.1.64.99 6379

./redis-cli -h 10.1.64.98 -p 6379
./redis-cli -h 10.1.64.98 -p 26379

./redis-cli -h 10.1.64.99 -p 6379
./redis-cli -h 10.1.64.99 -p 26379

./redis-cli -h 10.1.64.100 -p 6379
./redis-cli -h 10.1.64.100 -p 26379

查看全部
info
info server
查看哨兵
info sentinel
查看主
sentinel masters
sentinel master mymaster
查看副
sentinel slaves mymaster
查看名字mymaster的主服务器IP和port
sentinel get-master-addr-by-name mymaster

强制选举
sentinel failover mymaster
sentinel get-master-addr-by-name mymaster

登陆操作
-------------------------
./redis-cli
auth "password"

key value 操作
-------------------------
查看所有key
keys *

你可能感兴趣的:(redis note)