Reputation: 11
I m new to redis. i want to create redis cluster using 3 master nodes and 3 slave nodes. First i installed redis-server on all the three linux systems. Redis-server version that got installed is 4.0.9 I Edited /etc/redis/redis.conf file initiall like as below bind 127.0.0.1 192.168.X.XX protected-mode no port 6379 pidfile /var/run/redis_6379.pid cluster-enabled yes cluster-config-file nodes-6379.conf cluster-node-timeout 15000
with these changes redis server stopped running and i couldn't correct it back so i uninstalled and installed it back again. Now to create cluter i followed below procedures like mkdir cluster cd cluster
vi redis_master1.conf
bind 127.0.0.1 192.168.X.XX protected-mode no port 6380 pidfile /var/run/redis_6380.pid cluster-enabled yes cluster-config-file nodes-6380.conf cluster-node-timeout 15000
vi redis_slave1.conf
bind 127.0.0.1 192.168.X.XX protected-mode no port 6381 pidfile /var/run/redis_6381.pid cluster-enabled yes cluster-config-file nodes-6381.conf cluster-node-timeout 15000
There is change in ip address and port num in respective systems accordingly Now, when i gave redis-cli --cluster create 192.168.X.XX:6380 192.168.Y.YY:6381 192.168.Z.ZZ:6382 --cluster-replicas 1
i get the following error Unrecognized option or bad number of args for: '--cluster'
My Quetions are
Upvotes: 1
Views: 1726
Reputation: 2043
To answer your 2 questions.
redis-cli -h 127.0.0.1 -p 7000 --cluster create 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 --cluster-replicas 1
In the above command, the assumption is that redis is installed and running on all the 6 nodes.
For complete steps you can follow my github link
Upvotes: 2