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
, 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 again
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. Success
Make the configuration file effective
#source /etc/profile.d/rvm.sh
Download rvm dependencies
#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-develThe 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 rubyChange gem source
#gem source --add https://gems.ruby-china.com ---New gem China local source
#gem source -l —-View gem source
#gem source -- remove RubyGems.org | your community gem host ----Delete foreign official sources
##Verified version:
#rvm --version#ruby --version 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) It is said that the ruby3.0.0 version has two vulnerabilities and needs to be patched manually#ruby docs generate-ri Verify whether the version has been updated#ruby --version Update successful! Install redis-dump#gem install redis-dump The prompt saysIt probably means to install a higher version. You can directly follow the command he gave.
#gem install redis -v 4.4.0
The installation is successful, then execute the install redis-dump command
#gem install redis-dump
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!