linux redis集群搭建

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值