《日子》.分布式-redis cluster

zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/data0/src/redis-2.6.2/src'
make: *** [all] Error 2
解决办法:
make MALLOC=libc

yum install –y gcc*

yum install –y ruby

yum install –y ruby-rdoc

yum install rubygems

gem install redis

修改配置文件redis.conf
daemonize yes
cluster-enabled yes
cluster-config-file nodes-6379.conf
cluster-node-timeout 5000
appendonly yes

启动实例:
进入src ./redis-server ../redis.conf

接着运行集群创建命令:
./redis-trib.rb create --replicas 1 192.168.0.110:6379 192.168.0.111:6379 192.168.0.112:6379 192.168.0.113:6379 192.168.0.114:6379 192.168.0.115:6379
结果操作一直阻塞在 Waiting for the cluster to join.........................

集群的创建一定不可以用域,用ip创建,否则出错

client 测试:
./redis-cli -p 6379

cluster info

你可能感兴趣的:(《日子》.分布式-redis cluster)