redis note 博客分类: redis
程序员文章站
2024-02-23 11:17:37
...
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 *
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 博客分类: redis
-
git note 博客分类: git
-
git note 博客分类: git
-
redis note 博客分类: redis
-
HPM Note5, Query Performance Optimization 博客分类: Database performanceMySQLSQL Serverthreadmemcached
-
HPM Note3, Benchmarking and Profiling 博客分类: Database MySQLSQL ServerperformanceRailsLua
-
HPM Note1,Book Organization 博客分类: Database MySQLperformanceSecurityCC++
-
HPM Note2, MySQL Architecture 博客分类: Database MySQLSQL ServerSQL网页游戏游戏
-
HPM Note5, Query Performance Optimization 博客分类: Database performanceMySQLSQL Serverthreadmemcached
-
Py Language Reference note 博客分类: 读书笔记