redis cache

2016-11-14 14:45:55来源:oschina作者:pangsen人点击

install redishttps://github.com/MSOpenTech/redis/releases

--启动redis服务


redis-server.exe redis.windows.conf

config set

client connect


redis-cli -c -p 7000


set key value


get value


hgetall key


lrange key start end

Cluster


install rubyhttp://rubyinstaller.org/downloads/


install rubygemshttps://rubygems.org/pages/download


geminstallredis


port 7000
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes mkdir cluster-test
cd cluster-test
mkdir 7000 7001 7002 7003 7004 7005 cd 7000
../redis-server ./redis.conf

创建集群


./redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001
127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005

检查集群状况


redis-trib.rbcheck110.10.34.14:6380


add master node


redis-trib.rbadd-node10.10.34.14:638610.10.34.14:6381



Slave 节点



delete cluster node


http://www.cnblogs.com/yanghua1012/p/5679183.html


http://www.cnblogs.com/tankaixiong/articles/4022646.html


http://www.cnblogs.com/yjmyzz/p/redis-cluster-turotial.html


redis 数据类型http://blog.csdn.net/gaogaoshan/article/details/41039581/

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台