Centos7 builds redis sharding cluster environment redis-trib.rb create --replicas solutions to problems encountered

Share my own installation of redis sharding cluster in centos7 system

1. Execute the command as follows

/usr/local/redis-4.0.9/src/redis-trib.rb create --replicas 1 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


 /usr/bin/env: ruby: No such file or directory

/usr/local/redis-4.0.9/src/redis-trib.rb create --replicas 1 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

 This is ruby ​​is not installed Install ruby

yum install ruby

After installation, check the next version

ruby -v

 Then execute again 

/usr/local/redis-4.0.9/src/redis-trib.rb create --replicas 1 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

<

Guess you like

Origin blog.csdn.net/xiangfengl/article/details/128017848