redis编译后 复制6份 端口号7001-7006
把下面的复制进redis.conf
maxclients 10000
port 7006
bind 0.0.0.0
pidfile /var/run/redis_7006.pid
dir /usr/local/redis/7006
cluster-enabled yes
cluster-config-file nodes-7006.conf
daemonize yes
cluster-node-timeout 5000
appendonly yes
requirepass wang11011
masterauth wang11011
把redis.conf 改成nodes-7006.conf
其他的一样 但是端口号要修改
如果没有密码
[root@wzy-cloud redis]# redis-cli --cluster create 114.116.35.252:7000 114.116.35.252:7001 114.116.35.252:7002 114.116.35.252:7003 114.116.35.252:7004 114.116.35.252:7005 --cluster-replicas 1
没有反应就是端口被限制了 开放端口
如果加了密码,那么创建集群时就需要加
[root@wzy-cloud redis]# redis-cli --cluster create 114.116.35.252:7000 114.116.35.252:7001 114.116.35.252:7002 114.116.35.252:7003 114.116.35.252:7004 114.116.35.252:7005 --cluster-replicas 1 -a wzy123
不然会报错: [ERR] Node .8..*:7000 NOAUTH Authentication required.
转载 : aloneno