[root@localhost src]# ./redis-trib.rb create --replicas 1 192.168.2.3:7001 192.168.2.3:7002 192.168.2.3:7003 192.168.2.3:7004 192.168.2.3:7005 192.168.2.3:7006
WARNING: redis-trib.rb is not longer available!
You should use redis-cli instead.
All commands and features belonging to redis-trib.rb have been moved
to redis-cli.
In order to use them you should call redis-cli with the --cluster
option followed by the subcommand name, arguments and options.
Use the following syntax:
redis-cli --cluster SUBCOMMAND [ARGUMENTS] [OPTIONS]
Example:
redis-cli --cluster create 192.168.2.3:7001 192.168.2.3:7002 192.168.2.3:7003 192.168.2.3:7004 192.168.2.3:7005 192.168.2.3:7006 --cluster-replicas 1 -a 123456
To get help about all subcommands, type:
注意在redis5中不在使用redis-trib.rb,来创建集群,而是使用redis.cli来创建
集群文件目录结构如图所示