- 博客(3)
- 资源 (1)
- 收藏
- 关注
原创 redis创建cluster
在一些文档中,创建redis cluster需要采用redis-trib.rb脚本实现 但是,在redis5中,已经修改为采用redis-cli实现了,语法如下: redis-cli --cluster help Cluster Manager Commands: create host1:port1 ... hostN:portN --c...
2018-12-19 13:24:20 312
原创 sed 使用说明
1,打印第几行 sed -n '2p' input.lp >output.lp sed -n '2,10p' input.lp >output.lp 2,匹配数据,打印 sed -n '/patern/p' input.lp >output.lp 3,匹配数据,打印行号 sed -n '/patern/=' input.lp >output.lp 4,读取指定...
2018-12-18 16:34:44 597
原创 redis-py对sentinel的支持
redis-py同样支持Redis Sentinel,方法如下: from redis.sentinel import Sentinel sentinel = Sentinel([('localhost', 26379)], socket_timeout=0.1) print 'master:',sentinel.discover_master('mymaster') print 'slave...
2018-12-18 10:55:25 546
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人