In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "how to use Ruby script to deploy Redis Cluster cluster", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "how to use Ruby script to deploy Redis Cluster cluster" this article.
Install Ruby and Gem
Download rubywget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.8.tar.gz, extract tar xvf ruby-2.3.8.tar.gz to generate Makefile and then install it to / usr/local/ruby directory. / configure-prefix / usr/local/ruby compile make install make installcd / usr/local/rubycp bin/ruby / usr/local/bin/cp bin/gem / usr/local/bin/
Install the Ruby and redis interfaces
download
Wget https://rubygems.org/downloads/redis-4.1.0.gem
Installation
Gem install-l redis-4.1.0.gem
Move the script to / usr/local/bin/ for direct execution
Cp / usr/local/redis/src/redis-trib.rb / usr/local/bin/
Start the Redis node
8000 port profile template, other nodes only have different ports
# redis-8000.confdaemonize yesport 8000logfile "8000.log" dir "/ server/redis_data" dbfilename "dump-8000.rdb" cluster-enabled yescluster-config-file nodes-8000.confcluster-require-full-coverage no
Start the node
Redis-server redis-8000.conf redis-server redis-8001.conf redis-server redis-8002.conf redis-server redis-8003.conf redis-server redis-8004.conf redis-server redis-8005.conf
Open with one button
Redis-trib.rb create-- replicas 1 10.238.162.34 redis-trib.rb create 8000 10.238.162.34 shuffle 8001\ 10.238.162.34 purl 8002 10.238.162.34 shuffle 8003\ 10.238.162.34 shuffle 8004 10.238.162.34
# redis-cli-p 8000 cluster infocluster_state:okcluster_slots_assigned:16384cluster_slots_ok:16384cluster_slots_pfail:0cluster_slots_fail:0cluster_known_nodes:6cluster_size:3cluster_current_epoch:6cluster_my_epoch:1cluster_stats_messages_sent:695cluster_stats_messages_received:695# redis-cli-p 8000 cluster nodes4dd758d1f84285cbe82cd51f4b1bdce08f10d067 10.238.162.34 redis-cli 8004 slave cbcb2f95d3c66c3ad2203fb268be39eef8567317 01547215299946 5 connected860069c03aefeb7449aa6daf2f198d90f1f19b01 10.238.162.34 connected860069c03aefeb7449aa6daf2f198d90f1f19b01 8002 master-01547215297941 3 connected 10923-16383cbcb2f95d3c66c3ad2203fb268be39eef8567317 10.238 .162.34 master 8001 master-01547215298944 2 connected 5461-10922e84313e39765087ff8bfe4bf86b10717d82c9698 10.238.162.34demon8003 slave 90d1c2da65f7ee8cd7d16a7790384903bd4ccc8e 01547215297440 4 connectedbc0e954a60920a24c2bfa351c042470f1d8dda07 10.238.162.34slave 90d1c2da65f7ee8cd7d16a7790384903bd4ccc8e 8005 slave 860069c03aefeb7449aa6daf2f198d90f1f19b01 01547215296940 6 connected90d1c2da65f7ee8cd7d16a7790384903bd4ccc8e 10.238.162.34MAV 8000 myself Master-01 connected 0-5460 and above are all the contents of the article "how to deploy a Redis Cluster cluster using Ruby scripts" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.