Home  >  Article  >  Database  >  How to install redis-dump tool

How to install redis-dump tool

PHPz
PHPzforward
2023-05-27 17:52:121816browse

redis-dump tool is used for data migration in the cluster

Build environment:

192.168.19.201 redis-cluster 6379 7001 7002 rvm redis-dump

192.168. 19.202 redis-cluster 6379 7001 7002

192.168.19.203 redis-cluster 6379 7001 7002

Since installing the redis-dump tool requires the use of rvm and gem tools, it must be installed in advance

1. Install the dependency packages needed to install rvm and other tools in advance

#yum -y install zlib zlib-devel pcre pcre-devel gcc gcc-c openssl openssl-devel libevent libevent-devel perl unzip net-tools wget curl

If you do not install the above dependencies, an error will be reported

2. Install rvm

#gpg2 --keyserver hkp://keys.gnupg.net --recv -keys D39DC0E3 download key

If the error message shows

How to install redis-dump tool

, then you can use

curl -sSL https://rvm.io/ mpapis.asc | gpg2 --import -

curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -

#curl -L get.rvm.io | bash -s stable                                                                                                                                                                                                                                                                     /hosts

97.107.133.48 get.Rvm.io    —Add content

Just try againHow to install redis-dump tool

Display the above The content is that the installation was successful.

Use the find / -name rvm -print command to view the path of the rvm installation.

#find / -name rvm -print --- Display the result and it is installed. SuccessHow to install redis-dump tool

Make the configuration file effective

#source /etc/profile.d/rvm.sh

Download rvm dependenciesHow to install redis-dump tool

#rvm requirements

#rvmsudo yum -y install gcc-c patch readline readline-devel zlib zlib-devel libyaml-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel

The above rvm installation is complete!

Install ruby

#yum -y install automake autoconf libtool -----Dependencies required to install ruby

#yum -y install ruby ​​rubygems ruby-devel -- ---Install ruby

Change gem source

#gem source --add https://gems.ruby-china.com ---New gem China local source

How to install redis-dump tool

#gem source -l        —-View gem source

How to install redis-dump tool#gem source -- remove RubyGems.org | your community gem host ----Delete foreign official sources

##Verified version:How to install redis-dump tool

#rvm --version

#ruby --version

How to install redis-dump tool

After the preparation is completed, start upgrading the ruby ​​you just used, otherwise ruby2.0.0 cannot install redis-dump

# RVM List Known ----- You can view the installation version supported by RVM

# RVM Install "Ruby-2.3.3" ----- The Ruby -2.3.3 here is installed here (this step will be very great Slow, please keep the network connection good)

How to install redis-dump tool

It is said that the ruby3.0.0 version has two vulnerabilities and needs to be patched manually

#ruby docs generate-ri

How to install redis-dump tool

Verify whether the version has been updated

#ruby --version

How to install redis-dump tool

Update successful!

Install redis-dump

#gem install redis-dump

How to install redis-dump tool

The prompt says

How to install redis-dump tool

It probably means to install a higher version. You can directly follow the command he gave.

#gem install redis -v 4.4.0

How to install redis-dump tool

The installation is successful, then execute the install redis-dump command

#gem install redis-dump

How to install redis-dump tool

The above result is successful

The above is the detailed content of How to install redis-dump tool. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete