Redis, Ruby language runtime, Redis's Ruby Drive Redis-xxxx.gem, Create a Redis cluster tool REDIS-TRIB.RB (note: Redis clusters require at least 3 nodes, less than 3 cannot be created) 1. Download (zip format) and install Redis: (https://github.com/MSOpenTech/ redis/releases/) 1) will be downloaded to the Redis-x64-3.0.504.zip decompression, for ease of use, it is recommended to put in the disk descriptor directory, and modify the directory named Redis, such as:d:\redis 2) Starting 3 different Redis instances from the configuration file, the Redis default port is 6379, so 6380, 6381, and 6382来 are used to run 3 Redis instance 2. In the Redis directory d:/ New logs folder under Redis, and create profiles 3 under 3 ports. Installation of 3 Redis services g:/redis/redis-server.exe--service-install g:/redis/redis.6380.conf--service-name redis6380 g:/redis/redis-server.exe--service-install g:/redis/redis.6381.conf--service-name redis6381 g:/redis/redis-server.exe--service-install g:/redis/redis.6382.conf--service-name redis6382 4. Start these 3 services G:/redis/redis-server.exe--service-start--service-name redis6380 g:/redis/ Redis-server.exe--service-start--service-name redis6381 g:/redis/redis-server.exe--service-start-- Service-name Redis6382 5. Download and install Ruby: This means adding ruby to the environment variables of the system, which can be used directly in the cmd command (http://dl.bintray.com/oneclick/ Rubyinstaller/rubyinstaller-2.2.4-x64.exe) (Recommended for installation in the disk descriptor directory, such as: C:\Ruby22-x64) 6. Download the Redis driver (https://rubygems.org/gems/redis/versions/3.2.2) in Ruby Environment (command: Gem install--local G:\Ruby22-x64\ Redis-3.2.2.gem) 7. Download Redis's official Ruby script file for Redis cluster redis-trib.rb (https://raw.githubusercontent.com/MSOpenTech/redis/3.0 /SRC/REDIS-TRIB.RB) Open the link if you don't have a download, but instead open a page, save the page as redis-trib.rb 8. Creating a Redis cluster G:/REDIS/REDIS-TRIB.RB create--replicas 0 127.0.0.1:6380 127.0.0.1:6381 127.0.0.1:6382 & Nbsp;9. Verify that the creation was successful (g:/redis/redis-trib.rb check 127.0.0.1:6380) 10. Use Redis client Redis-cli.exe to see the number of data records, and cluster-related information G:/REDIS/REDIS-CLI.EXE-C-P 6380 g:/redis/ Redis-cli.exe-c-P 6380 dbsize 11.redis off g:/redis/redis-server.exe--service-stop--service-name redis6380 g:/reDis/redis-server.exe--service-stop--service-name redis6381 g:/redis/redis-server.exe--service-stop-- Service-name redis6382
To build a redis cluster under Windows environment