redis redis water notes eight ruby cluster installation

1, ruby ​​installation

[root@hadoop02 redis-client]# yum install ruby   
已加载插件:fastestmirror

# 查看安装的ruby version
[root@hadoop02 redis-client]# ruby -v
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
[root@hadoop02 redis-client]# 

# 安装redis-client 客户端,最新的redis-4.1.3.gem
# wget https://rubygems.org//downloads/redis-4.1.3.gem

# 安装redis-4.1.3.gem

[root@hadoop02 redis-client]# gem install -l redis-4.1.3.gem 
ERROR:  Loading command: install (LoadError)
	cannot load such file -- zlib
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

# 缺少
[root@hadoop02 redis-client]# yum install zlib-devel

I found that there are some installation problems?

  Temporarily unresolved.

It may be due not take effect library, reboot reboot, perform the discovery again

[root@hadoop02 redis-client]# ls
redis-4.1.3.gem
[root@hadoop02 redis-client]# gem install redis-4.1.3.gem 
ERROR:  Error installing redis-4.1.3.gem:
	redis requires Ruby version >= 2.3.0.

It is a different version, so to upgrade ruby ​​version. This is relatively easy to handle, go to the official website to download the latest version, and use the source code installation.

wget https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.5.tar.gz

#解压后
[root@hadoop02 ruby-2.6.5]# ./configure --prefix=/usr/local/ruby
checking for ruby... /bin/ruby
tool/config.guess already exists
tool/config.sub already exists

[root@hadoop02 ruby-2.6.5]# make
	BASERUBY = /bin/ruby --disable=gems
	CC = gcc
	LD = ld
	LDSHARED = gcc -shared

to be continued. . .

-----

Find source installation. . . ,

[root@hadoop05 bin]# ruby -v

ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-linux]

Only this version of the installation was successful, all tears. . .

---

[root@hadoop05 ruby]# gem install redis-4.1.3.gem 
Successfully installed redis-4.1.3
Parsing documentation for redis-4.1.3
Installing ri documentation for redis-4.1.3
Done installing documentation for redis after 1 seconds

Run redis-trib.rb

5.0 above have been found not rely redis-trib.rb up.

[root@hadoop05 src]# ./redis-trib.rb 
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]

Tears. . . .

All functions here ;;

[root@hadoop05 src]# ./redis-cli --cluster help
Cluster Manager Commands:
  create         host1:port1 ... hostN:portN
                 --cluster-replicas <arg>
  check          host:port
                 --cluster-search-multiple-owners
  info           host:port
  fix            host:port
                 --cluster-search-multiple-owners
  reshard        host:port
                 --cluster-from <arg>
                 --cluster-to <arg>
                 --cluster-slots <arg>
                 --cluster-yes
                 --cluster-timeout <arg>
                 --cluster-pipeline <arg>
                 --cluster-replace
  rebalance      host:port
                 --cluster-weight <node1=w1...nodeN=wN>
                 --cluster-use-empty-masters
                 --cluster-timeout <arg>
                 --cluster-simulate
                 --cluster-pipeline <arg>
                 --cluster-threshold <arg>
                 --cluster-replace
  add-node       new_host:new_port existing_host:existing_port
                 --cluster-slave
                 --cluster-master-id <arg>
  del-node       host:port node_id
  call           host:port command arg arg .. arg
  set-timeout    host:port milliseconds
  import         host:port
                 --cluster-from <arg>
                 --cluster-copy
                 --cluster-replace
  help           

For check, fix, reshard, del-node, set-timeout you can specify the host and port of any working node in the cluster.

 

Published 61 original articles · won praise 1 · views 665

Guess you like

Origin blog.csdn.net/u012842247/article/details/103466630