In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to build a Redis Cluster environment under the Windows environment. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Build Redis cluster, three master nodes, three slave nodes, multi-master nodes to distribute the cluster, slave nodes for high availability.
1. Download redis
Address: https://github.com/MicrosoftArchive/redis/releases
The version 3.0.503 Source code used in this case can be downloaded together, which will be used below.
two。 Install redis
Extract Redis-x64-3.0.503.zip and copy it, as shown below
3. Modify each redis.windows.conf, modify the port number in it, and the configuration of the cluster
Port 6380
Cluster-enabled yes
Cluster-config-file nodes.conf
Cluster-node-timeout 15000
Appendonly yes
4. Create a new bat script under each directory to start each redis service
5. Install Ruby
Redis's cluster is written in Ruby script, so the system needs to have a Ruby environment.
Download address: https://www.jb51.net/jiaoben/141880.html
Installation, the place marked in the red box below is required.
Verification: open the cmd window, enter ruby-version and the version number appears to indicate that the installation is successful
6. Install the ruby driver rubygems for redis
Address: https://rubygems.org/pages/download
It may be a little slow, or you can download it at the address below.
Https://www.jb51.net/softs/539242.html
7. Unzip it to the 6380 folder (anywhere, just for ease of putting it together)
Go to the rubygems-2.7.7 directory and execute the cmd command: ruby setup.rb
8. Change to the 6380 directory and execute the command gem install redis
9. Enter the folder of each port, execute the start-server.bat file, and start the service of each node
10. Install the cluster script redis-trib
Find the source code downloaded in the first step, decompress it, and copy the redis-trib.rb under the src path to the 6380 folder
And execute the following command in the current directory
Ruby redis-trib.rb create-- replicas 1 127.0.0.1 6380 127.0.0.1 Fraser 6381 127.0.1 Discovery 6382 127.0.1 Fraser 6383 127.0.1 0.1 Flux 6384 127.0.1
Note: if Node is not empty appears, clear the nodes.conf and dump.rdb files under all port directories and repeat step 9 before executing the above command.
Pay attention to the red mark on the way, yes.
11. Verify that the cluster starts successfully
If you see the tag information, it indicates that the startup was successful.
This is the end of the article on "how to build a Redis Cluster environment in Windows". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.